AdjustTest.Pcl.TestPackageHandler.TestAddPackage C# (CSharp) Method

TestAddPackage() public method

public TestAddPackage ( ) : void
return void
        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");
        }