private void CreateWizardSteps(DynamicContentPublishingGroup item) { var itemParameter = new KeyValuePair<string,object>("item", item); RegisterStep(_overviewVmFactory.GetViewModelInstance(itemParameter)); RegisterStep(_placesVmFactory.GetViewModelInstance(itemParameter)); RegisterStep(_contentVmFactory.GetViewModelInstance(itemParameter)); RegisterStep(_conditionsVmFactory.GetViewModelInstance(itemParameter)); }
public CreateContentPublishingItemViewModel( IViewModelsFactory<IContentPublishingOverviewStepViewModel> overviewVmFactory, IViewModelsFactory<IContentPublishingContentPlacesStepViewModel> placesVmFactory, IViewModelsFactory<IContentPublishingDynamicContentStepViewModel> contentVmFactory, IViewModelsFactory<IContentPublishingConditionsStepViewModel> conditionsVmFactory, DynamicContentPublishingGroup item) { _overviewVmFactory = overviewVmFactory; _placesVmFactory = placesVmFactory; _conditionsVmFactory = conditionsVmFactory; _contentVmFactory = contentVmFactory; CreateWizardSteps(item); }
public static TestContentPublishingBuilder BuildDynamicContentPublishingGroup() { var contentPublishing = new DynamicContentPublishingGroup() { Name = "default", Description = "default_Description", Priority = 5, IsActive = true, StartDate = DateTime.Now.Date.AddDays(-5), EndDate = DateTime.Now.Date.AddDays(5) }; return new TestContentPublishingBuilder(contentPublishing); }
private TestContentPublishingBuilder(DynamicContentPublishingGroup contentPublishingGroup) { _contentPublishingGroup = contentPublishingGroup; }
public ContentPublishingOverviewStepViewModel(IRepositoryFactory<IDynamicContentRepository> repositoryFactory, IDynamicContentEntityFactory entityFactory, DynamicContentPublishingGroup item) : base(null, null, repositoryFactory, null, entityFactory, item) { }
public ContentPublishingConditionsStepViewModel( IRepositoryFactory<ICountryRepository> countryRepositoryFactory, IViewModelsFactory<ISearchCategoryViewModel> searchCategoryVmFactory, IRepositoryFactory<IStoreRepository> storeRepositoryFactory, IRepositoryFactory<IDynamicContentRepository> repositoryFactory, IDynamicContentEntityFactory entityFactory, DynamicContentPublishingGroup item) : base(countryRepositoryFactory, searchCategoryVmFactory, repositoryFactory, storeRepositoryFactory, entityFactory, item) { }
public void Can_save_content_publishing_with_5_conditions_in_ExpressionBuilder() { var client = GetRepository(); var groupId = Guid.NewGuid().ToString(); var dbReviewreview = new DynamicContentPublishingGroup { DynamicContentPublishingGroupId = groupId, Name = "Test content publishing", Description = "Test content publishing description", IsActive = true, Priority = 1, }; client.Add(dbReviewreview); client.UnitOfWork.Commit(); //RefreshClient RefreshRepository(ref client); var loadedContentPublishing = client.PublishingGroups.Where(r => r.DynamicContentPublishingGroupId == groupId).SingleOrDefault(); Assert.Equal(groupId, loadedContentPublishing.DynamicContentPublishingGroupId); //aa: add conditions expression and predicate tree serialized of 5 conditions. loadedContentPublishing.ConditionExpression = ConditionExpression; loadedContentPublishing.PredicateVisualTreeSerialized = PredicateSerialized; client.UnitOfWork.Commit(); //RefreshClient RefreshRepository(ref client); loadedContentPublishing = client.PublishingGroups.Where(r => r.DynamicContentPublishingGroupId == groupId).SingleOrDefault(); }