public async Task GetStockTypesAsync_Returns_StockTypes() { //Arrange var service = new StockTypeService(_myRestaurantContext); //Act var result = await service.GetStockTypesAsync(); //Assert result.Should().BeAssignableTo <IEnumerable <StockType> >(); result.Should().HaveCount(3); }
public async Task AddStockTypeAsync_Returns_New_StockType() { //Arrange var service = new StockTypeService(_myRestaurantContext); //Act var result = await service.AddStockTypeAsync(new StockType { Type = "Office", Description = "" }); //Assert result.Should().BeAssignableTo <StockType>(); result.Type.Should().Be("Office"); result.Description.Should().Be(""); //Act var stockTypes = await service.GetStockTypesAsync(); //Assert stockTypes.Should().HaveCount(4); }