Beispiel #1
0
        public void CompareTo_HandlesBNull()
        {
            var aMock = new Mock <IRenderable>();

            TestDelegate func = () => RenderableCompare.CompareTo(aMock.Object, null);

            Assert.Throws <ArgumentNullException>(func);
        }
Beispiel #2
0
        public void CompareTo_HandlesBFirstInOrder()
        {
            var aMock = new Mock <IRenderable>();

            aMock.SetupGet(m => m.RenderDepth).Returns(1);
            var bMock = new Mock <IRenderable>();

            bMock.SetupGet(m => m.RenderDepth).Returns(0);

            var result = RenderableCompare.CompareTo(aMock.Object, bMock.Object);

            Assert.AreEqual(1, result);
        }
Beispiel #3
0
 public int CompareTo(IRenderable other)
 {
     return(RenderableCompare.CompareTo(this, other));
 }
Beispiel #4
0
        public void CompareTo_HandlesANull()
        {
            TestDelegate func = () => RenderableCompare.CompareTo(null, null);

            Assert.Throws <ArgumentNullException>(func);
        }