Beispiel #1
0
        public void CompareTo_Null_Throws()
        {
            var key = new ExtentKey();

            Assert.Throws <ArgumentNullException>(() => key.CompareTo((BTreeKey)null));
            Assert.Throws <ArgumentNullException>(() => key.CompareTo((ExtentKey)null));
        }
Beispiel #2
0
        public void CompareTo_Works(int nodeId, int otherNodeId, int startBlock, int otherStartBlock, bool resourceFork, bool otherResourceFork, int expected)
        {
            var key   = new ExtentKey(new CatalogNodeId((uint)nodeId), (uint)startBlock, resourceFork);
            var other = new ExtentKey(new CatalogNodeId((uint)otherNodeId), (uint)otherStartBlock, otherResourceFork);

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