private PageType CreatePageType() { var pageType = new PageType { Behaviour = new PageBehaviour(), Name = "PageType - " + Guid.NewGuid().ToString(), PageTypeCategory = PageTypeCategories.Regular }; Repository.Data.Save(pageType); return pageType; }
public void PageTypeInsertTest() { var pageType = new PageType(); try { Repository.Data.Save(pageType); } catch (ValidationArgumentException ex) { Assert.True(ex.ValidationResult.Count == 2); } }