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); }
public void TestVersion_CurrentVersion() { string version = CHECK_OPERATOR_CURRENT_CASE; Update expectedUpdate = new Update() { UpToDate = true, }; this.CheckOperatorTest(version, expectedUpdate); }
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); }
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); }