public override void SetUp()
        {
            base.SetUp();

            AdjustFactory.Logger = MockLogger;

            var activityHandler = UtilTest.GetActivityHandler(MockLogger, DeviceUtil);

            MockLogger.Reset();

            ClickPackage = UtilTest.CreateClickPackage(activityHandler, "");

            MockHttpMessageHandler = new MockHttpMessageHandler(MockLogger);
            AdjustFactory.SetHttpMessageHandler(MockHttpMessageHandler);

            MockPackageHandler = new MockPackageHandler(MockLogger);
            RequestHandler     = new RequestHandler(MockPackageHandler);

            /*
             * var packageBuilder = new PackageBuilder()
             * {
             *  UserAgent = DeviceUtil.GetUserAgent(),
             *  ClientSdk = DeviceUtil.ClientSdk,
             * };
             * SessionPackage = packageBuilder.BuildSessionPackage();
             * */
        }
        private ActivityPackage CreateUnknowPackage(string suffix)
        {
            var activityPackage = UtilTest.CreateClickPackage(ActivityHandler, suffix);

            activityPackage.ActivityKind = ActivityKind.Unknown;
            return(activityPackage);
        }
        public void TestAddPackage()
        {
            ActivityPackage firstClickPackage = UtilTest.CreateClickPackage(ActivityHandler, "FirstPackage");

            PackageHandler.AddPackage(firstClickPackage);

            DeviceUtil.Sleep(1000);

            AddPackageTests(packageNumber: 1, packageString: "clickFirstPackage");

            PackageHandler secondPackageHandler = AddSecondPackageTest(null);

            ActivityPackage secondClickPackage = UtilTest.CreateClickPackage(ActivityHandler, "ThirdPackage");

            secondPackageHandler.AddPackage(secondClickPackage);

            DeviceUtil.Sleep(1000);

            AddPackageTests(packageNumber: 3, packageString: "clickThirdPackage");

            // send the first click package/ first package
            secondPackageHandler.SendFirstPackage();
            DeviceUtil.Sleep(1000);

            Assert.Test("RequestHandler SendPackage, clickFirstPackage");

            // send the second click package/ third package
            secondPackageHandler.SendNextPackage();
            DeviceUtil.Sleep(1000);

            Assert.Test("RequestHandler SendPackage, clickThirdPackage");

            // send the unknow package/ second package
            secondPackageHandler.SendNextPackage();
            DeviceUtil.Sleep(1000);

            Assert.Test("RequestHandler SendPackage, unknownSecondPackage");
        }