예제 #1
0
		public void Equals_SameEverythingButType_NotEqual()
		{
			var ms1 = new MethodSignature(GetType(), "Method", new[] {typeof (string)});
			var ms2 = new MethodSignature(typeof (string), "Method", new[] {typeof (string)});
			Assert.IsFalse(ms1.Equals(ms2));
			Assert.AreNotEqual(ms1.GetHashCode(), ms2.GetHashCode());
			Assert.AreNotEqual(ms1.ToString(), ms2.ToString());
		}
예제 #2
0
		public void Equals_DifferentNameSameTypes_NotEqual()
		{
			var ms1 = new MethodSignature(GetType(), "Method1", new[] {typeof (string)});
			var ms2 = new MethodSignature(GetType(), "Method2", new[] {typeof (string)});
			Assert.IsFalse(ms1.Equals(ms2));
			Assert.AreNotEqual(ms1.GetHashCode(), ms2.GetHashCode());
			Assert.AreNotEqual(ms1.ToString(), ms2.ToString());
		}
예제 #3
0
		public void Equals_SameNameSameTypes_Works()
		{
			var ms1 = new MethodSignature(GetType(), "Method", new[] {typeof (string)});
			var ms2 = new MethodSignature(GetType(), "Method", new[] {typeof (string)});
			Assert.IsTrue(ms1.Equals(ms2));
			Assert.AreEqual(ms1.GetHashCode(), ms2.GetHashCode());
			Assert.AreEqual(ms1.ToString(), ms2.ToString());
		}
예제 #4
0
 public void Equals_SameNameDifferentNumberOfTypes_NotEqual()
 {
   MethodSignature ms1 = new MethodSignature(GetType(), "Method", new Type[] { typeof(string) });
   MethodSignature ms2 = new MethodSignature(GetType(), "Method", new Type[] { typeof(string), typeof(string) });
   Assert.IsFalse(ms1.Equals(ms2));
   Assert.AreNotEqual(ms1.GetHashCode(), ms2.GetHashCode());
   Assert.AreNotEqual(ms1.ToString(), ms2.ToString());
 }
예제 #5
0
        public void Equals_SameEverythingButType_NotEqual()
        {
            var ms1 = new MethodSignature(GetType(), "Method", new[] { typeof(string) });
            var ms2 = new MethodSignature(typeof(string), "Method", new[] { typeof(string) });

            Assert.IsFalse(ms1.Equals(ms2));
            Assert.AreNotEqual(ms1.GetHashCode(), ms2.GetHashCode());
            Assert.AreNotEqual(ms1.ToString(), ms2.ToString());
        }
예제 #6
0
        public void Equals_DifferentNameSameTypes_NotEqual()
        {
            var ms1 = new MethodSignature(GetType(), "Method1", new[] { typeof(string) });
            var ms2 = new MethodSignature(GetType(), "Method2", new[] { typeof(string) });

            Assert.IsFalse(ms1.Equals(ms2));
            Assert.AreNotEqual(ms1.GetHashCode(), ms2.GetHashCode());
            Assert.AreNotEqual(ms1.ToString(), ms2.ToString());
        }
예제 #7
0
        public void Equals_SameNameSameTypes_Works()
        {
            var ms1 = new MethodSignature(GetType(), "Method", new[] { typeof(string) });
            var ms2 = new MethodSignature(GetType(), "Method", new[] { typeof(string) });

            Assert.IsTrue(ms1.Equals(ms2));
            Assert.AreEqual(ms1.GetHashCode(), ms2.GetHashCode());
            Assert.AreEqual(ms1.ToString(), ms2.ToString());
        }
예제 #8
0
        public void Equals_SameNameDifferentNumberOfTypes_NotEqual()
        {
            MethodSignature ms1 = new MethodSignature(GetType(), "Method", new Type[] { typeof(string) });
            MethodSignature ms2 = new MethodSignature(GetType(), "Method", new Type[] { typeof(string), typeof(string) });

            Assert.IsFalse(ms1.Equals(ms2));
            Assert.AreNotEqual(ms1.GetHashCode(), ms2.GetHashCode());
            Assert.AreNotEqual(ms1.ToString(), ms2.ToString());
        }