public async Task GetServiceTypesAsync_Returns_ServiceTypes() { //Arrange var service = new ServiceTypeService(_myRestaurantContext); //Act var result = await service.GetServiceTypesAsync(); //Assert result.Should().BeAssignableTo <IEnumerable <ServiceType> >(); result.Should().HaveCount(2); }
public async Task AddServiceTypeAsync_Returns_New_ServiceType() { //Arrange var service = new ServiceTypeService(_myRestaurantContext); //Act var result = await service.AddServiceTypeAsync(new ServiceType { Type = "Buffet" }); //Assert result.Should().BeAssignableTo <ServiceType>(); result.Type.Should().Be("Buffet"); //Act var stockTypes = await service.GetServiceTypesAsync(); //Assert stockTypes.Should().HaveCount(3); }