public void CreateEntity_Should_Create_pilot_typeof_Pilot() { // Arrange PilotDTO pilotDTO = new PilotDTO { Id = 1, FirstName = "Bob", LastName = "Henk", Experience = 10, BirthDate = new DateTime(1998, 07, 12) }; Pilot pilot = new Pilot { Id = 1, FirstName = "Bob", LastName = "Henk", Experience = 10, BirthDate = new DateTime(1998, 07, 12) }; var pilotRepository = new FakeRepository <Pilot>(); var pilotService = new PilotService(pilotRepository); // Act pilotService.CreateEntity(pilotDTO); var result = pilotRepository.Get(1); // Assert Assert.AreEqual(pilot, result); }
public void AddPilot() { service.CreateEntity(SelectedPilot); FillPilotsCollection(); }