Ejemplo n.º 1
0
        public void WhenAwardingPromoOnServer_ProperBackendCall_IsMade()
        {
            ILoginPromotionData mockData = Substitute.For <ILoginPromotionData>();

            mockData.GetId().Returns("TestId");

            LoginPromoPopupHelper systemUnderTest = CreateSystem();

            systemUnderTest.AwardPromoOnServer(mockData);

            MockBackend.Received().MakeCloudCall(BackendMethods.UPDATE_LOGIN_PROMO_PROGRESS,
                                                 Arg.Is <Dictionary <string, string> >(x => x.ContainsKey(LoginPromoPopupHelper.PROMO_ID) && x[LoginPromoPopupHelper.PROMO_ID] == "TestId"),
                                                 Arg.Any <Callback <Dictionary <string, string> > >());
        }
Ejemplo n.º 2
0
        public void WhenAllMonstersDead_BackendVictoryMethodCalled()
        {
            systemUnderTest.OnAllMonstersDead();

            MockBackend.Received().MakeCloudCall(BackendMethods.COMPLETE_DUNGEON_SESSION, Arg.Any <Dictionary <string, string> >(), Arg.Any <Callback <Dictionary <string, string> > >());
        }