public void WhenStarted_IfNoActivePromos_StepIsDone() { ShowLoginPromosStep systemUnderTest = CreateSystem(); systemUnderTest.Start(); CheckStepIsDone(); }
public void WhenStarting_ExpectedMessagesSubscribed() { ShowLoginPromosStep systemUnderTest = CreateSystem(); systemUnderTest.Start(); MockMessenger.Received().AddListener(SingleLoginPromoDisplayPM.PROMO_DISMISSED_EVENT, Arg.Any <Callback>()); }
public void WhenStarted_IfActivePromos_AndPromoShouldNotShow_PromoIsNotShown() { MockHelper.ShouldShowPromoAsPopup(Arg.Any <ISingleLoginPromoProgressSaveData>(), Arg.Any <ILoginPromotionData>()).Returns(false); SetActiveProgressOnMockManagerWithIds(new List <string>() { "Test_1" }); ShowLoginPromosStep systemUnderTest = CreateSystem(); systemUnderTest.Start(); MockAllPromosPM.DidNotReceive().DisplayPromoAndHideOthers("Test_1"); }
public void WhenPromoIsDismissed_IfNoOtherPromos_StepIsDone() { SetActiveProgressOnMockManagerWithIds(new List <string>() { "Test_1" }); ShowLoginPromosStep systemUnderTest = CreateSystem(); systemUnderTest.Start(); systemUnderTest.ProcessNextPromotion(); CheckStepIsDone(); }
public void WhenPromoIsDismissed_IfOtherPromos_NextPromoIsShown() { MockHelper.ShouldShowPromoAsPopup(Arg.Any <ISingleLoginPromoProgressSaveData>(), Arg.Any <ILoginPromotionData>()).Returns(true); SetActiveProgressOnMockManagerWithIds(new List <string>() { "Test_1", "Test_2" }); ShowLoginPromosStep systemUnderTest = CreateSystem(); systemUnderTest.Start(); systemUnderTest.ProcessNextPromotion(); MockAllPromosPM.Received().DisplayPromoAndHideOthers("Test_2"); }