AdjustTest.Pcl.TestActivityHandler.CheckSubsession C# (CSharp) Method

CheckSubsession() private method

private CheckSubsession ( int sessionCount = 1, int subsessionCount = 1, bool timerAlreadyStarted = null, bool askAttributionIsCalled = null ) : void
sessionCount int
subsessionCount int
timerAlreadyStarted bool
askAttributionIsCalled bool
return void
        private void CheckSubsession(int sessionCount = 1, int subsessionCount = 1,
            bool? timerAlreadyStarted = null, bool? askAttributionIsCalled = null)
        {
            // test the new sub session
            Assert.Test("PackageHandler ResumeSending");

            // save activity state
            Assert.Debug("Wrote Activity state: ec:0 sc:{0} ssc:{1}", sessionCount, subsessionCount);

            if (subsessionCount > 1)
            {
                // test the subsession message
                Assert.Info("Started subsession {0} of session {1}", subsessionCount, sessionCount);
            }
            else
            {
                // test the subsession message
                Assert.NotInfo("Started subsession ");
            }

            if (askAttributionIsCalled.HasValue)
            {
                if (askAttributionIsCalled.Value)
                {
                    Assert.Test("AttributionHandler AskAttribution");
                }
                else
                {
                    Assert.NotTest("AttributionHandler AskAttribution");
                }
            }

            if (timerAlreadyStarted.HasValue)
            {
                CheckTimerIsFired(!timerAlreadyStarted.Value);
            }
        }