Exemplo n.º 1
0
        public void TestEqual()
        {
            var left  = new NoSuchObject();
            var right = new NoSuchObject();

            Assert.AreEqual(left, right);
        }
Exemplo n.º 2
0
        public void TestToBytes()
        {
            NoSuchObject obj = new NoSuchObject();

            Assert.Equal(new byte[] { 0x80, 0x00 }, obj.ToBytes());
            Assert.Equal(0, obj.GetHashCode());
        }
        public void TestEqual()
        {
            var left = new NoSuchObject();
            var right = new NoSuchObject();
            Assert.AreEqual(left, right);
            Assert.IsTrue(left == right);
// ReSharper disable EqualExpressionComparison
            Assert.IsTrue(left == left);
// ReSharper restore EqualExpressionComparison
            Assert.IsTrue(left.Equals(right));
            Assert.IsTrue(left != null);

            Assert.Throws<ArgumentNullException>(() => left.AppendBytesTo(null));
            Assert.AreEqual("NoSuchObject", left.ToString());
        }
Exemplo n.º 4
0
        public void TestEqual()
        {
            var left = new NoSuchObject();
            var right = new NoSuchObject();
            Assert.Equal(left, right);
            Assert.True(left == right);
// ReSharper disable EqualExpressionComparison
            Assert.True(left == left);
// ReSharper restore EqualExpressionComparison
            Assert.True(left.Equals(right));
            Assert.True(left != null);

            Assert.Throws<ArgumentNullException>(() => left.AppendBytesTo(null));
            Assert.Equal("NoSuchObject", left.ToString());
        }
 public void TestToBytes()
 {
     NoSuchObject obj = new NoSuchObject();
     Assert.AreEqual(new byte[] { 0x80, 0x00 }, obj.ToBytes());
     Assert.AreEqual(0, obj.GetHashCode());
 }
 public void TestEqual()
 {
     var left = new NoSuchObject();
     var right = new NoSuchObject();
     Assert.AreEqual(left, right);
 }
Exemplo n.º 7
0
        public void TestToBytes()
        {
            NoSuchObject obj = new NoSuchObject();

            Assert.AreEqual(new byte[] { 0x80, 0x00 }, obj.ToBytes());
        }