public void RemoveDonationsByNameFromOrganization()
        {
            var dataContext = new DataContext();
            int result = dataContext.GetDonationsForOrganization("UGM").Count();
            dataContext.RemoveDonationsOfNameFromOrganization("UGM", "Canned Beans");

            Assert.AreNotEqual<int>(result, dataContext.GetDonationsForOrganization("UGM").Count());
        }
        public void AddElementToDonations()
        {
            var dataContext = new DataContext();
            int result = dataContext.GetDonationsForOrganization("UGM").Count();
            dataContext.AddDonationsToOrganization("UGM", new Donation() { _id = ObjectId.GenerateNewId().ToString(), Name = "Blankets", OrganizationName = "UGM", Quantity = 50, NeededByDate = new DateTime(2013, 02, 03, 06, 00, 00) });

            Assert.AreNotEqual<int>(result, dataContext.GetDonationsForOrganization("UGM").Count());
        }
        public void RemoveSpecificDonationFromOrganization()
        {
            var dataContext = new DataContext();
            int result = dataContext.GetDonationsForOrganization("UGM").Count();
            Donation specificDonation = dataContext.GetDonationsForOrganization("UGM").FirstOrDefault();
            dataContext.RemoveDonationFromOrganization("UGM", specificDonation);

            Assert.AreNotEqual<int>(result, dataContext.GetDonationsForOrganization("UGM").Count());
        }
Пример #4
0
        public void WhenGetDonationsForOrganizationUGMThenResultHasManyItems()
        {
            var dataContext = new DataContext();
            var result = dataContext.GetDonationsForOrganization("UGM");

            Assert.AreNotEqual<int>(0, result.Count());
        }
Пример #5
0
        public void WhenGetDonationsForOrganizationUGMThenNotNull()
        {
            var dataContext = new DataContext();
            var result = dataContext.GetDonationsForOrganization("UGM");

            Assert.IsNotNull(result);
        }
Пример #6
0
        public void WhenGetDonationsForOrganizationUGMThenFirstResultHasNameEqualCannedBeans()
        {
            var dataContext = new DataContext();
            var result = dataContext.GetDonationsForOrganization("UGM");

            Assert.AreEqual<string>("Canned Beans", result.First().Name);
        }
        public void RemoveVolunteersByNameFromOrganization()
        {
            var dataContext = new DataContext();
            int result = dataContext.GetDonationsForOrganization("UGM").Count();
            dataContext.RemoveVolunteersOfNameFromOrganization("UGM", "Hair Dresser");

            Assert.AreNotEqual<int>(result, dataContext.GetVolunteersForOrganization("UGM").Count());
        }