public async Task BeforeEach() { _config = new TestsConfig(); _mockProduct = new Product() { Reference = "mockProduct", Name = "Mock product" }; await AppServices.LocationService .CreateAsync(new Location() { Name = "Test location" }); _mockLocation = await AppServices.LocationService.GetByIdAsync(2); _mockMainLocation = await AppServices.LocationService.GetMainAsync(); _mockUser = await AppServices.UserService.GetByIdAsync(1); await AppServices.ProductService .CreateAsync(_mockProduct, _mockUser.UserId); }
public void BeforeEachAsync() { _config = new TestsConfig(); _mockLocation = new Location() { Name = "new Location" }; }
public override IUserAuthRepository CreateAuthRepo() { var db = new PocoDynamo(TestsConfig.CreateDynamoDBClient()); db.DeleteAllTables(); var dynamoDbRepo = new DynamoDbAuthRepository(db); InitTest(dynamoDbRepo); dynamoDbRepo.InitSchema(); return(dynamoDbRepo); }
public async Task BeforeEachAsync() { _config = new TestsConfig(); _admin = await AppServices.UserService.GetByIdAsync(1); // admin _mainLocation = await AppServices.LocationService.GetMainAsync(); _mockProducts.AddRange(new Product[] { new Product() { Reference = "001", Name = "product#1" }, new Product() { Reference = "002", Name = "product#2" }, }); }
public async Task BeforeEach() { _config = new TestsConfig(); _adminUser = await AppServices.UserService.GetByIdAsync(1); _mockProducts.AddRange(new Product[] { new Product() { Reference = "mockRef1", Name = "Mock product 1", }, new Product() { Reference = "mockRef2", Name = "Mock product 2", } }); }
private void CreateTestList() { //gets all tests config var testsConfigs = TestingUtil.GenerateAllTestsConfigs(this._testsConfig); if (testsConfigs.Count == 0) { MessageBox.Show("There are no tests configurations to save.", "Problem saving tests configuration file.", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } //asks user for file to save list and saves configs var testsConfigsJson = Util.SelectSaveTestsConfigFile(); if (File.Exists(testsConfigsJson)) { File.Delete(testsConfigsJson); } TestsConfig.SerializeJsonFile(testsConfigs, testsConfigsJson); }
public void BeforeEach() { _config = new TestsConfig(); }
public static List <ITestsConfig> SelectReadTestsConfig(string message = null) { var fileName = SelectOpenTestsConfigFile(message); return(fileName == null ? new List <ITestsConfig>() : TestsConfig.DeserializeJsonFile(fileName)); }
private static GrpcServiceClient GetClient() => TestsConfig.GetInsecureClient();