public void TestSetBuild() { MutableVersion v = new MutableVersion(); v.Build = 100; Assert.AreEqual(100, v.Build); }
public void TestSetRevision() { MutableVersion v = new MutableVersion(); v.Revision = 100; Assert.AreEqual(100, v.Revision); }
public void TestSetMinor() { MutableVersion v = new MutableVersion(); v.Minor = 100; Assert.AreEqual(100, v.Minor); }
public void TestConstructorWithAllParams() { MutableVersion v = new MutableVersion(1, 2, 3, 4); Assert.AreEqual(1, v.Major); Assert.AreEqual(2, v.Minor); Assert.AreEqual(3, v.Revision); Assert.AreEqual(4, v.Build); }
public void TestConstructorWith1Param() { MutableVersion v = new MutableVersion(1); Assert.AreEqual(1, v.Major); Assert.AreEqual(0, v.Minor); Assert.AreEqual(0, v.Revision); Assert.AreEqual(0, v.Build); }
public void TestDefaultConstructor() { MutableVersion v = new MutableVersion(); Assert.AreEqual(0, v.Major); Assert.AreEqual(0, v.Minor); Assert.AreEqual(0, v.Revision); Assert.AreEqual(0, v.Build); }
public void TestSetNegativeBuild() { MutableVersion v = new MutableVersion(); Assert.That(() => { v.Build = -1; }, Throws.InstanceOf <ArgumentOutOfRangeException>() ); }
public bool Equals(MutableVersion _p) { if ((object)_p == null) { return(false); } return(Major == _p.Major && Minor == _p.Minor && Revision == _p.Revision && Build == _p.Build); }
/**********************************************************************************/ public override bool Equals(object _o) { MutableVersion p = _o as MutableVersion; return(Equals(p)); }
public void TestToString() { MutableVersion v = new MutableVersion(11, 0, 1, 22234); Assert.AreEqual("11.0.1.22234", v.ToString()); }