Exemplo n.º 1
0
        public void TestSomeContactCredits()
        {
            // Grant contact credits.

            var employer = CreateEmployer(0);

            _allocationsCommand.DeallocateAll(_allocationsQuery, employer.Id);
            _allocationsCommand.CreateAllocation(new Allocation {
                OwnerId = employer.Id, CreditId = _creditsQuery.GetCredit <ContactCredit>().Id, InitialQuantity = 10
            });

            // Assert.

            LogIn(employer);
            Get(_settingsUrl);
            AssertPageContains(_creditsQuery.GetCredit <ContactCredit>().ShortDescription + ": " + GetCurrentContactCreditQuantity(employer.Id) + " remaining");
            AssertPageDoesNotContain(UnlimitedQuantityText);
        }