public async Task OneTimeSetUp() { TestSetUp.Reset(false); _robotTest = new RobotTest(); await _robotTest.OneTimeSetUp(); }
public void OneTimeSetUp() { TestSetUp.Reset(); AgentTester.Create <PersonAgent, Person>() .ExpectStatusCode(HttpStatusCode.NotFound) .Run((a) => a.Agent.GetAsync(404.ToGuid())); }
public async Task OneTimeSetUp() { TestSetUp.Reset(false); _config = AgentTester.Configuration.GetSection("CosmosDb"); var cc = new Cosmos.CosmosClient(_config.GetValue <string>("EndPoint"), _config.GetValue <string>("AuthKey")); _csu = await CosmosDbContainerSetUp.ReplaceAndOpenAsync(cc, _config.GetValue <string>("Database"), new Cosmos.ContainerProperties { Id = "Items", PartitionKeyPath = "/_partitionKey", UniqueKeyPolicy = new Cosmos.UniqueKeyPolicy { UniqueKeys = { new Cosmos.UniqueKey { Paths = { "/serialNo"} } } } }, 400); await _csu.ImportBatchAsync <RobotTest, Robot>("Data.yaml", "items"); }
public async Task OneTimeSetUp() { TestSetUp.Reset(false); var config = AgentTester.Configuration.GetSection("CosmosDb"); _removeAfterUse = config.GetValue <bool>("RemoveAfterUse"); _cosmosDb = new CosmosDb(new Cosmos.CosmosClient(config.GetValue <string>("EndPoint"), config.GetValue <string>("AuthKey")), config.GetValue <string>("Database"), createDatabaseIfNotExists: true); var rc = await _cosmosDb.ReplaceOrCreateContainerAsync( new Cosmos.ContainerProperties { Id = "Items", PartitionKeyPath = "/_partitionKey", UniqueKeyPolicy = new Cosmos.UniqueKeyPolicy { UniqueKeys = { new Cosmos.UniqueKey { Paths = { "/serialNo"} } } } }, 400); await rc.ImportBatchAsync <RobotTest, Robot>("Data.yaml", "Robot"); var rdc = await _cosmosDb.ReplaceOrCreateContainerAsync( new Cosmos.ContainerProperties { Id = "RefData", PartitionKeyPath = "/_partitionKey", UniqueKeyPolicy = new Cosmos.UniqueKeyPolicy { UniqueKeys = { new Cosmos.UniqueKey { Paths = { "/type","/value/code" } } } } }, 400); await rdc.ImportValueRefDataBatchAsync <RobotTest>(ReferenceData.Current, "RefData.yaml"); }
public void OneTimeSetUp() => TestSetUp.Reset();
public void OneTimeSetUp() { TestSetUp.Reset(false); }