public virtual ApiApiKeyResponseModel MapBOToModel( BOApiKey boApiKey) { var model = new ApiApiKeyResponseModel(); model.SetProperties(boApiKey.Id, boApiKey.ApiKeyHashed, boApiKey.Created, boApiKey.JSON, boApiKey.UserId); return(model); }
public void MapResponseToRequest() { var mapper = new ApiApiKeyModelMapper(); var model = new ApiApiKeyResponseModel(); model.SetProperties("A", "A", DateTimeOffset.Parse("1/1/1987 12:00:00 AM"), "A", "A"); ApiApiKeyRequestModel response = mapper.MapResponseToRequest(model); response.ApiKeyHashed.Should().Be("A"); response.Created.Should().Be(DateTimeOffset.Parse("1/1/1987 12:00:00 AM")); response.JSON.Should().Be("A"); response.UserId.Should().Be("A"); }