C# Class Microsoft.WindowsAzure.MobileServices.TestFramework.TestHarness

Harness for a test framework that allows asynchronous unit testing.
Exibir arquivo Open project: Azure/azure-mobile-apps-net-client Class Usage Examples

Public Methods

Method Description
DecodeBase64String ( string storageContainerSasToken ) : string
GenerateTestConfigFromInputFile ( string storageSasToken, string inputFileContent ) : Microsoft.WindowsAzure.MobileServices.TestFramework.TestConfig
GetBlobStorageSasUrl ( string storageContainerUrl, string storageContainerSasToken, string filePath ) : string
LoadTestAssembly ( Assembly testAssembly ) : void

Load the tests from the given assembly.

Log ( string message ) : void

Logs a message.

ReadFileFromBlobStorageAsync ( string blobStorageSasUrl ) : Task
RunAsync ( ) : void

Run the unit tests.

TestHarness ( ) : System

Initializes a new instance of the TestHarness class.

UploadToBlobContainerAsync ( string blobStorageSasUrl, string fileContent ) : Task

Private Methods

Method Description
CreateGroup ( Type type ) : Microsoft.WindowsAzure.MobileServices.TestFramework.TestGroup
CreateMethod ( Type type, object instance, MethodInfo method ) : Microsoft.WindowsAzure.MobileServices.TestFramework.TestMethod
FilterTests ( ) : int

Filter out any test methods basd on the current settings.

GetBlobStorageUrl ( string storageContainerUrl, string filePath ) : string
LoadTestAssembly ( TestHarness harness, Assembly testAssembly ) : void

Method Details

DecodeBase64String() public static method

public static DecodeBase64String ( string storageContainerSasToken ) : string
storageContainerSasToken string
return string

GenerateTestConfigFromInputFile() public static method

public static GenerateTestConfigFromInputFile ( string storageSasToken, string inputFileContent ) : Microsoft.WindowsAzure.MobileServices.TestFramework.TestConfig
storageSasToken string
inputFileContent string
return Microsoft.WindowsAzure.MobileServices.TestFramework.TestConfig

GetBlobStorageSasUrl() public static method

public static GetBlobStorageSasUrl ( string storageContainerUrl, string storageContainerSasToken, string filePath ) : string
storageContainerUrl string
storageContainerSasToken string
filePath string
return string

LoadTestAssembly() public method

Load the tests from the given assembly.
public LoadTestAssembly ( Assembly testAssembly ) : void
testAssembly System.Reflection.Assembly The assembly from which to load tests.
return void

Log() public method

Logs a message.
public Log ( string message ) : void
message string The message.
return void

ReadFileFromBlobStorageAsync() public static method

public static ReadFileFromBlobStorageAsync ( string blobStorageSasUrl ) : Task
blobStorageSasUrl string
return Task

RunAsync() public method

Run the unit tests.
public RunAsync ( ) : void
return void

TestHarness() public method

Initializes a new instance of the TestHarness class.
public TestHarness ( ) : System
return System

UploadToBlobContainerAsync() public static method

public static UploadToBlobContainerAsync ( string blobStorageSasUrl, string fileContent ) : Task
blobStorageSasUrl string
fileContent string
return Task