public virtual ApiPasswordResponseModel MapBOToModel( BOPassword boPassword) { var model = new ApiPasswordResponseModel(); model.SetProperties(boPassword.BusinessEntityID, boPassword.ModifiedDate, boPassword.PasswordHash, boPassword.PasswordSalt, boPassword.Rowguid); return(model); }
public void MapResponseToRequest() { var mapper = new ApiPasswordModelMapper(); var model = new ApiPasswordResponseModel(); model.SetProperties(1, DateTime.Parse("1/1/1987 12:00:00 AM"), "A", "A", Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da")); ApiPasswordRequestModel response = mapper.MapResponseToRequest(model); response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.PasswordHash.Should().Be("A"); response.PasswordSalt.Should().Be("A"); response.Rowguid.Should().Be(Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da")); }