public async Task CreateManufactoryAsyncShouldReturnName() { var manufactoryRepository = new Repository <Manufactory>(db); var manufactoryService = new ManufactoryService(manufactoryRepository); var manufactory = await manufactoryService.CreateManufactoryAsync("Kaih"); var expected = "Kaih"; var actual = manufactory.Name; Assert.Equal(expected, actual); }
public async Task GetManufactoryByNameAsyncShouldReturnId() { var manufactoryRepository = new Repository <Manufactory>(db); var manufactoryService = new ManufactoryService(manufactoryRepository); var manufactoryCreate = await manufactoryService.CreateManufactoryAsync("Kaih"); var manufactory = await manufactoryService.GetManufactoryByNameAsync("Kaih"); var expected = 1; var actual = manufactory.Id; Assert.Equal(expected, actual); }