public void DeveRetornarObjetoUtilizandoMapeamentoPadrao() { var entity = UserDtoMock.CreateUser1(); var expected = UserDtoMock.CreateUser1(); var actual = new UserDtoToDtoMapper().ToMap(entity); AssertEqual(expected, actual); }
public void DeveRetornarPreenchidoQuandoPreenchido() { var entity = UserMock.CreateUser1(); var expected = UserDtoMock.CreateUser1(); var actual = mapper.ToMap(entity); AssertEqual(expected, actual); }
public void DeveRetornarAlteradoQuandoPreenchidoComOutraObjeto() { var entity = UserMock.CreateUser1(); var expected = UserDtoMock.CreateUser1(); var actual = mapper.ToMap(entity, UserDtoMock.CreateUser2()); AssertEqual(expected, actual); }
public void DeveRetornarListaPreenchidaQuandoPreenchida() { var list = UserMock.CreateList(); var expected = UserDtoMock.CreateList(); var actual = mapper.ToMapList(list); AssertEqual(expected.FirstOrDefault(), actual.FirstOrDefault()); }
public void DeveRetornarListaPreenchidaQuandoPreenchida() { var entity = UserMock.CreateUser1(); var expected = UserDtoMock.CreateUser1(); var actual = mapper.ToMapList(new List <User> { entity }); AssertEqual(expected, actual.FirstOrDefault()); }