Ejemplo n.º 1
0
        /// <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));
        }
Ejemplo n.º 2
0
        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);
        }