Exemple #1
0
        public SchemaDTO MapFrom(Schema schema)
        {
            var schemaDTO = new SchemaDTO(schema, schema.TimeBetweenRepetitions.Dimension);

            schemaDTO.TimeBetweenRepetitionsParameter = _parameterDTOMapper.MapFrom(schema.TimeBetweenRepetitions, schemaDTO, x => x.TimeBetweenRepetitions, x => x.TimeBetweenRepetitionsParameter);
            schemaDTO.StartTimeParameter           = _parameterDTOMapper.MapFrom(schema.StartTime, schemaDTO, x => x.StartTime, x => x.StartTimeParameter);
            schemaDTO.NumberOfRepetitionsParameter = _parameterDTOMapper.MapFrom(schema.NumberOfRepetitions, schemaDTO, x => x.NumberOfRepetitions, x => x.NumberOfRepetitionsParameter);
            schema.SchemaItems.OrderBy(x => x.Name).Each(item => schemaDTO.AddSchemaItem(_schemaItemDtoMapper.MapFrom(item)));
            return(schemaDTO);
        }
 public void should_not_do_anything()
 {
     A.CallTo(() => _schemaDTO.AddSchemaItem(A <SchemaItemDTO> .Ignored)).MustNotHaveHappened();
 }
 public void should_update_the_view_accordingly()
 {
     A.CallTo(() => _schemaDTO.AddSchemaItem(_schemaItemDTO)).MustHaveHappened();
 }