Esempio n. 1
0
        public void CheckOperatorTest(string version, Update expectedUpdate)
        {
            BalanceManager target = new BalanceManager();
            Update actualUpdate = target.CheckOperators(version);

            Assert.IsTrue(expectedUpdate.NewVersion == actualUpdate.NewVersion
                & CheckOperatorList(expectedUpdate.OperatorList,actualUpdate.OperatorList)
                & expectedUpdate.UpToDate == actualUpdate.UpToDate);
        }
Esempio n. 2
0
        public void TestVersion_CurrentVersion()
        {
            string version = CHECK_OPERATOR_CURRENT_CASE;

            Update expectedUpdate = new Update()
            {                
                UpToDate = true,
            };

            this.CheckOperatorTest(version, expectedUpdate);
        }
Esempio n. 3
0
        public void TestVersion_OlderVersion()
        {
            string version = CHECK_OPERATOR_OLDER_CASE;

            Update expectedUpdate = new Update()
            {
                NewVersion = DateTime.Now.ToString(Settings.VERSION_PATTERN),
                OperatorList = new string[] { "SmartBelize", "CubacelCuba", "OrangeDominicanRepublic" },
                UpToDate = false,
            };

            this.CheckOperatorTest(version, expectedUpdate);
        }
Esempio n. 4
0
        public void TestVersion_NewerVersion()
        {
            string version = CHECK_OPERATORS_NEWER_CASE;

            Update expectedUpdate = new Update()
            {
                NewVersion = DateTime.Now.ToString(Settings.VERSION_PATTERN),
                OperatorList = new string[] { "SmartBelize", "CubacelCuba", "MobitelSriLanka" },
                UpToDate = false,
            };

            this.CheckOperatorTest(version, expectedUpdate);
        }