/// <summary> /// Gets Json from Resources and Transforms it into the Output format /// </summary> /// <returns>string</returns> public string GetLearner() { LearnerDTO learnerDTO = JsonFactory.LoadJson(); LearnerModel learnerModel = mappers.LearnerDTOtoLearnerModel(learnerDTO); OutputModel outputModel = mappers.LearnerModeltoOutputModel(learnerModel); OutputDTO outputDTO = mappers.OutputModeltoOutputDTO(outputModel); return(JsonFactory.JsonSerialize(outputDTO)); }
public void JsonSerialize_ShouldSerializeDTOtoJson() { //Arrange OutputDTO output = new OutputDTO { source_id = "999", first_name = "Oscar", last_name = "Moby" }; //Act string Json = JsonFactory.JsonSerialize(output); //Assert Assert.NotNull(Json); }