Example #1
0
        // インスタレーションが削除されたかどうかチェック
        private void CheckDeleteInstallation(NbPushInstallationBase installation)
        {
            bool isDeleted = true;

            if (installation.OsType != null)
            {
                isDeleted = false;
            }
            if (installation.OsVersion != null)
            {
                isDeleted = false;
            }
            if (installation.DeviceToken != null)
            {
                isDeleted = false;
            }
            if (installation.PushType != null)
            {
                isDeleted = false;
            }
            if (installation.Channels != null)
            {
                isDeleted = false;
            }
            if (installation.AppVersionCode != -1)
            {
                isDeleted = false;
            }
            if (installation.AppVersionString != null)
            {
                isDeleted = false;
            }
            if (installation.AllowedSenders != null)
            {
                isDeleted = false;
            }
            if (installation.InstallationId != null)
            {
                isDeleted = false;
            }
            if (installation.Owner != null)
            {
                isDeleted = false;
            }
            if (installation.Options != null)
            {
                isDeleted = false;
            }

            if (!isDeleted)
            {
                Assert.Fail("Installation Not Deleted");
            }
        }
Example #2
0
        public void SetUp()
        {
            TestUtils.Init();
            DeleteStorage();

            // inject Mock RestExecutor
            executor = new MockRestExecutor();
            NbService.Singleton.RestExecutor = executor;

            installation = new NbPushInstallation(null);
        }