コード例 #1
0
        public void Equals_should_return_false_for_changed_struct()
        {
            var first = new SimpleStruct();

            first.X = 1;
            first.Y = 2;
            var second = new SimpleStruct();

            second.X = 1;
            second.Y = 3;

            var result = first.Equals(second);

            Assert.False(result);
        }
コード例 #2
0
        public void Equals_should_return_true_for_equal_structs()
        {
            var first = new SimpleStruct();

            first.X = 1;
            first.Y = 2;
            var second = new SimpleStruct();

            second.X = 1;
            second.Y = 2;

            var result = first.Equals(second);

            Assert.True(result);
        }