Exemplo n.º 1
0
        public void CompareToWithUnequalObjectTypes()
        {
            UploadToken first  = new UploadToken();
            object      second = new object();

            Assert.Throws <ArgumentException>(() => first.CompareTo(second));
        }
Exemplo n.º 2
0
        public void CompareToOperatorWithEqualObjects()
        {
            var    first  = new UploadToken();
            object second = first.Clone();

            Assert.AreEqual(0, first.CompareTo(second));
        }
Exemplo n.º 3
0
        public void CompareToWithSmallerFirstObject()
        {
            var first  = new UploadToken(1);
            var second = new UploadToken(2);

            Assert.IsTrue(first.CompareTo(second) < 0);
        }
Exemplo n.º 4
0
        public void CompareToWithNullObject()
        {
            UploadToken first  = new UploadToken();
            object      second = null;

            Assert.AreEqual(1, first.CompareTo(second));
        }