コード例 #1
0
        public void WorkUnitQuery_Compare_IsGreaterThanNullQuery()
        {
            var query = new WorkUnitQuery();

            Assert.IsTrue(query.CompareTo(null) > 0);
            Assert.IsTrue(query > null);
        }
コード例 #2
0
        public void WorkUnitQuery_Compare_AreEqual()
        {
            var query1 = new WorkUnitQuery();
            var query2 = new WorkUnitQuery();

            Assert.IsTrue(query1.CompareTo(query2) == 0);
            Assert.IsTrue(query1 == query2);
        }
コード例 #3
0
        public void WorkUnitQuery_Compare_IsGreaterThanNull()
        {
            var query1 = new WorkUnitQuery();
            var query2 = new WorkUnitQuery {
                Name = null
            };

            Assert.IsTrue(query1.CompareTo(query2) > 0);
            Assert.IsTrue(query1 > query2);
        }
コード例 #4
0
        public void WorkUnitQuery_Compare_IsLessThan()
        {
            var query1 = new WorkUnitQuery();
            var query2 = new WorkUnitQuery {
                Name = "Name"
            };

            Assert.IsTrue(query1.CompareTo(query2) < 0);
            Assert.IsTrue(query1 < query2);
        }
コード例 #5
0
        public void WorkUnitQuery_Compare_NullAreEqual()
        {
            var query1 = new WorkUnitQuery {
                Name = null
            };
            var query2 = new WorkUnitQuery {
                Name = null
            };

            Assert.AreEqual(0, query1.CompareTo(query2));
        }
コード例 #6
0
        public void WorkUnitQuery_Compare_AreNotEqual()
        {
            var query1 = new WorkUnitQuery {
                Name = "A"
            };
            var query2 = new WorkUnitQuery {
                Name = "B"
            };

            Assert.IsTrue(query1.CompareTo(query2) != 0);
            Assert.IsTrue(query1 != query2);
        }