Beispiel #1
0
 public bool AreRewardsRemaining(ILoginPromotionData i_promoData)
 {
     if (i_promoData != null)
     {
         return(CollectCount < i_promoData.GetRewardsCount());
     }
     else
     {
         return(false);
     }
 }
Beispiel #2
0
        public void AreRewardsRemaining_ReturnsAsExpected(int i_rewardsCollected, int i_totalRewards, bool i_expectedResult)
        {
            SingleLoginPromoProgressSaveData systemUnderTest = new SingleLoginPromoProgressSaveData();

            systemUnderTest.CollectCount = i_rewardsCollected;

            ILoginPromotionData mockData = Substitute.For <ILoginPromotionData>();

            mockData.GetRewardsCount().Returns(i_totalRewards);
            bool areRewardsRemaining = systemUnderTest.AreRewardsRemaining(mockData);

            Assert.AreEqual(i_expectedResult, areRewardsRemaining);
        }