public void CompareTo_SimpleNumber() { DbVersion lowVersion = new DbVersion(0, 0, 0, 0); DbVersion highVersion = new DbVersion(0, 0, 0, 1); Assert.IsTrue(lowVersion.CompareTo(highVersion) < 0); }
public void CompareTo_HigherNumber() { DbVersion lowVersion = new DbVersion(0, 0, 0, 2); DbVersion highVersion = new DbVersion(0, 0, 0, 10); Assert.IsTrue(lowVersion.CompareTo(highVersion) < 0); }
public void Test_CompareTo_equal(string dbVersionStr1, string dbVersionStr2) { DbVersion dbVersion1 = DbVersion.FromString(dbVersionStr1); DbVersion dbVersion2 = DbVersion.FromString(dbVersionStr2); Assert.AreEqual(0, dbVersion1.CompareTo(dbVersion2)); Assert.AreEqual(0, dbVersion2.CompareTo(dbVersion1)); }
public void Test_CompareTo_first_smaller(string dbVersionStr1, string dbVersionStr2) { DbVersion dbVersion1 = DbVersion.FromString(dbVersionStr1); DbVersion dbVersion2 = DbVersion.FromString(dbVersionStr2); Assert.AreEqual(-1, dbVersion1.CompareTo(dbVersion2)); Assert.AreEqual(1, dbVersion2.CompareTo(dbVersion1)); }