Exemplo n.º 1
0
 public void TestCompareVersion()
 {
     Assert.IsTrue(UpdateChecker.CompareVersion("2.3.1.0", "2.3.1") == 0);
     Assert.IsTrue(UpdateChecker.CompareVersion("1.2", "1.3") < 0);
     Assert.IsTrue(UpdateChecker.CompareVersion("1.3", "1.2") > 0);
     Assert.IsTrue(UpdateChecker.CompareVersion("1.3", "1.3") == 0);
     Assert.IsTrue(UpdateChecker.CompareVersion("1.2.1", "1.2") > 0);
     Assert.IsTrue(UpdateChecker.CompareVersion("2.3.1", "2.4") < 0);
     Assert.IsTrue(UpdateChecker.CompareVersion("1.3.2", "1.3.1") > 0);
 }