C5UnitTests.RecordsTests.Basic.FourElement C# (CSharp) Method

FourElement() private method

private FourElement ( ) : void
return void
        public void FourElement()
        {
            Rec<string, string, int, int> rec1, rec2, rec3;
              rec1 = new Rec<string, string, int, int>("abe", null, 0, 1);
              rec2 = new Rec<string, string, int, int>("abe", null, 0, 1);
              rec3 = new Rec<string, string, int, int>("abe", "kat", 0, 1);
              Assert.IsTrue(rec1 == rec2);
              Assert.IsFalse(rec1 != rec2);
              Assert.IsFalse(rec1 == rec3);
              Assert.IsTrue(rec1 != rec3);
              Assert.IsTrue(rec1.Equals(rec2));
              Assert.IsFalse(rec1.Equals(rec3));
              //
              Assert.IsFalse(rec1.Equals(null));
              Assert.IsFalse(rec1.Equals("bamse"));
              //
              Assert.IsTrue(rec1.GetHashCode() == rec2.GetHashCode());
              Assert.IsFalse(rec1.GetHashCode() == rec3.GetHashCode());
              //
              Assert.AreEqual("abe", rec1.X1);
              Assert.IsNull(rec1.X2);
              Assert.AreEqual(0, rec1.X3);
              Assert.AreEqual(1, rec1.X4);
        }