Пример #1
1
		public void Should_return_actual_objects_HashCode()
		{
			const string testString = "Hello World!";
			var @class = new TestClass { TestValue = testString };
			var reader = new PropertyReader<TestClass>("TestValue");
			reader.GetItemHashCode(@class).ShouldEqual(testString.GetHashCode());
		}
Пример #2
0
        public void Should_return_zero_when_trying_to_get_a_null_objects_HashCode()
        {
            var @class = new TestClass();
            var reader = new PropertyReader <TestClass>("TestValue");

            reader.GetItemHashCode(@class).ShouldEqual(0);
        }
Пример #3
0
        public void Should_return_actual_objects_HashCode()
        {
            const string testString = "Hello World!";
            var          @class     = new TestClass {
                TestValue = testString
            };
            var reader = new PropertyReader <TestClass>("TestValue");

            reader.GetItemHashCode(@class).ShouldEqual(testString.GetHashCode());
        }
Пример #4
0
		public void Should_return_zero_when_trying_to_get_a_null_objects_HashCode()
		{
			var @class = new TestClass();
			var reader = new PropertyReader<TestClass>("TestValue");
			reader.GetItemHashCode(@class).ShouldEqual(0);
		}