private async Task <ApiCurrencyResponseModel> CreateRecord() { var model = new ApiCurrencyRequestModel(); model.SetProperties(DateTime.Parse("1/1/1988 12:00:00 AM"), "B"); CreateResponse <ApiCurrencyResponseModel> result = await this.Client.CurrencyCreateAsync(model); result.Success.Should().BeTrue(); return(result.Record); }
public void MapModelToBO() { var mapper = new BOLCurrencyMapper(); ApiCurrencyRequestModel model = new ApiCurrencyRequestModel(); model.SetProperties(DateTime.Parse("1/1/1987 12:00:00 AM"), "A"); BOCurrency response = mapper.MapModelToBO("A", model); response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.Name.Should().Be("A"); }
public void MapRequestToResponse() { var mapper = new ApiCurrencyModelMapper(); var model = new ApiCurrencyRequestModel(); model.SetProperties(DateTime.Parse("1/1/1987 12:00:00 AM"), "A"); ApiCurrencyResponseModel response = mapper.MapRequestToResponse("A", model); response.CurrencyCode.Should().Be("A"); response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.Name.Should().Be("A"); }
public void CreatePatch() { var mapper = new ApiCurrencyModelMapper(); var model = new ApiCurrencyRequestModel(); model.SetProperties(DateTime.Parse("1/1/1987 12:00:00 AM"), "A"); JsonPatchDocument <ApiCurrencyRequestModel> patch = mapper.CreatePatch(model); var response = new ApiCurrencyRequestModel(); patch.ApplyTo(response); response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.Name.Should().Be("A"); }