Ejemplo n.º 1
0
        public void PetGroupsWithNoPets()
        {
            var petGroups = new PetGroups();

            Assert.IsFalse(petGroups.HasGroups);
            Assert.AreEqual(0, petGroups.Collection.Count);
        }
Ejemplo n.º 2
0
        public void CheckGroupByProperty()
        {
            var petGroups = new PetGroups();

            Assert.IsNotNull(petGroups);
            petGroups.GroupedBy = "Age";
            Assert.AreEqual("Age", petGroups.GroupedBy);
        }
Ejemplo n.º 3
0
        public void PetGroupsWithPets()
        {
            var petGroups = new PetGroups();

            petGroups.Collection.Add(new WebSite.Pages.Shared.Pets());
            Assert.IsTrue(petGroups.HasGroups);
            Assert.AreEqual(1, petGroups.Collection.Count);
        }
Ejemplo n.º 4
0
        public void OnGet()
        {
            var owners = OwnerRepository.GetAllOwners();

            if (owners != null)
            {
                GroupOfPets           = ModelFactory.Create(owners.CatOwners.GroupBy(owner => owner.Gender, owner => owner.Cats));
                GroupOfPets.GroupedBy = "Gender";
            }
            else
            {
                GroupOfPets = new PetGroups();
            }
        }
Ejemplo n.º 5
0
        public void CreatePetGroupsObject()
        {
            var petGroups = new PetGroups();

            Assert.IsNotNull(petGroups);
        }