public void ValidateDefault()
        {
            ArticleColorViewModel viewModel = new ArticleColorViewModel();
            var result = viewModel.Validate(null);

            Assert.True(result.Count() > 0);
        }
        public ArticleColor MapToModel(ArticleColorViewModel viewModel)
        {
            ArticleColor model = new ArticleColor();

            PropertyCopier <ArticleColorViewModel, ArticleColor> .Copy(viewModel, model);

            return(model);
        }
        public ArticleColorViewModel MapToViewModel(ArticleColor model)
        {
            ArticleColorViewModel viewModel = new ArticleColorViewModel();

            PropertyCopier <ArticleColor, ArticleColorViewModel> .Copy(model, viewModel);

            return(viewModel);
        }
        public void should_Success_Instantiate()
        {
            ArticleColorViewModel viewModel = new ArticleColorViewModel()
            {
                Name        = "Name",
                Description = "Description"
            };

            Assert.Equal("Name", viewModel.Name);
            Assert.Equal("Description", viewModel.Description);
        }
예제 #5
0
        public ArticleColor MapToModel(ArticleColorViewModel colorVM)
        {
            ArticleColor color = new ArticleColor();

            color.Id                 = colorVM._id;
            color.UId                = colorVM.UId;
            color._IsDeleted         = colorVM._deleted;
            color.Active             = colorVM._active;
            color._CreatedUtc        = colorVM._createdDate;
            color._CreatedBy         = colorVM._createdBy;
            color._CreatedAgent      = colorVM._createAgent;
            color._LastModifiedUtc   = colorVM._updatedDate;
            color._LastModifiedBy    = colorVM._updatedBy;
            color._LastModifiedAgent = colorVM._updateAgent;
            color.Code               = colorVM.code;
            color.Name               = colorVM.name;

            return(color);
        }
 internal Dictionary <string, object> Ok <T>(ArticleColorViewModel viewModel)
 {
     throw new NotImplementedException();
 }