public void GetSimulationById_ReturnsProperSimulationDto_IfExists() { //Arrange EFSimulationRepository repository = new EFSimulationRepository(); List <SimulationDto> simulations = new List <SimulationDto>(); SimulationDto expected = new SimulationDto() { Id = 1, Name = "a" }; simulations.AddRange(new SimulationDto[] { expected }); clearSimulationsTables(); repository.UpdateSimulations(simulations); //Act SimulationDto dto = repository.GetSimulationById(expected.Id); //Assert var areEqual = expected.Equals(dto); Assert.IsTrue(areEqual); }
public void CopyProperties_AfterwardAllPropertiesAreEqual() { //Arrange var baseItem = new SimulationDto() { Id = 1, Name = "a" }; var comparedItem = new SimulationDto() { Id = 1, Name = "b" }; //Act comparedItem.CopyProperties(baseItem); var areEqual = baseItem.Equals(comparedItem); //Assert Assert.IsTrue(areEqual); }