public void CreateGroups_Null_ArgumentNullExceptionThrown()
 {
     // Arrange
     // Act / Assert
     Assert.Throws <GroupListParameterNullException>(
         () => AlphaGroupListGroupCollection <PaymentViewModel> .CreateGroups(null, CultureInfo.CurrentUICulture, s => ""));
 }
        public void CreateGroupReturnsCorrectGroup()
        {
            // Arrange
            var accountList = new List <AccountViewModel>
            {
                new AccountViewModel {
                    Name = "a"
                },
                new AccountViewModel {
                    Name = "b"
                }
            };

            // Act
            List <AlphaGroupListGroupCollection <AccountViewModel> > createdGroup
                = AlphaGroupListGroupCollection <AccountViewModel> .CreateGroups(accountList,
                                                                                 CultureInfo.CurrentUICulture,
                                                                                 s => s.Name);

            // Assert
            createdGroup.Should().HaveCount(2);
            createdGroup[0][0].Name.Should().Be("a");
            createdGroup[1][0].Name.Should().Be("b");
        }