Пример #1
0
        public void Update_ForGroup_ReturnActionResult()
        {
            // Arrange
            InitializeHttpUpdate();
            var controller = new GroupController();
            var group      = new Models.Group()
            {
                CustomerID       = GroupId,
                UpdatedUserID    = GroupId,
                FolderID         = GroupId,
                GroupName        = FolderName,
                MasterSupression = 0,
                CreatedUserID    = GroupId,
                PublicFolder     = 1,
                AllowUDFHistory  = UdfHistory,
                IsSeedList       = false
            };

            // Act
            var result = controller.Update(group) as JsonResult;

            // Assert
            result.ShouldSatisfyAllConditions(
                () => result.ShouldNotBeNull(),
                () => result.Data.ShouldNotBeNull());
        }
Пример #2
0
        private static IList <SortDescriptor> CreateSortDescriptor()
        {
            var group = new Models.Group()
            {
                GroupName = GroupName
            };
            var sortDescriptor = new SortDescriptor(group.GroupName, ListSortDirection.Ascending);

            return(new List <SortDescriptor> {
                sortDescriptor
            });
        }