public void CanGetAllMechanics() { //Arrange MechanicService mechanicService = new MechanicService(MechanicTestResource.TESTMECHANICS); //Act var result = mechanicService.GetMechanics(); //Assert Assert.Equal(10, result.ToList().Count); Assert.Equal(10, mechanicService.Mechanics.ToList().Count); }
public void Example_FindAllMechanics() { //Arrange List <Mechanic> mechanics = _service.GetMechanics(); //Act var result = (from mechanic in mechanics select mechanic).ToList().Count(); //Assert Assert.Equal(10, result); }
public void Example_FindAllMechanics() { //Arrange List <Mechanic> mechanics = _service.GetMechanics(); //Act List <Mechanic> result = mechanics.Select(mechanic => mechanic).ToList(); result.ForEach(mechanic => _testOutputHelper.WriteLine(mechanic.Name)); //print names in additional output //Assert Assert.Equal(10, result.Count); }