예제 #1
0
        public void Equals_methods_should_return_false_when_values_are_not_equal()
        {
            var a = new Commit("msg", new DateTime(2011, 1, 1), "larspars", uri, 1);
			
            var b = new Commit("msg2", new DateTime(2011, 1, 1), "larspars", uri, 1);
            var c = new Commit("msg", new DateTime(2011, 1, 2), "larspars", uri, 1);
            var d = new Commit("msg", new DateTime(2011, 1, 1), "larspars2", uri, 1);
            var e = new Commit("msg", new DateTime(2011, 1, 1), "larspars", anotherUri, 1);
			
            Assert.IsFalse(a.Equals(b));
            Assert.IsFalse(a.Equals(c));
            Assert.IsFalse(a.Equals(d));
            Assert.IsFalse(a.Equals(e));
        }
예제 #2
0
 public void Equals_methods_should_not_be_based_on_referential_equality_but_on_values()
 {
     var a = new Commit("msg", new DateTime(2011, 1, 1), "larspars", uri, 1);
     var b = new Commit("msg", new DateTime(2011, 1, 1), "larspars", uri, 1);
     Assert.IsTrue(a.Equals(b));
 }