コード例 #1
0
        public void CompareTo_Null_Throws()
        {
            var key = new CatalogKey();

            Assert.Throws <ArgumentNullException>(() => key.CompareTo((BTreeKey)null));
            Assert.Throws <ArgumentNullException>(() => key.CompareTo((CatalogKey)null));
        }
コード例 #2
0
        public void CompareTo_Works(int nodeId, int otherNodeId, string name, string otherName, int result)
        {
            var key   = new CatalogKey(new CatalogNodeId((uint)nodeId), name);
            var other = new CatalogKey(new CatalogNodeId((uint)otherNodeId), otherName);

            Assert.Equal(result, key.CompareTo(other));
        }