public void CompareTo_HandlesBNull() { var aMock = new Mock <IRenderable>(); TestDelegate func = () => RenderableCompare.CompareTo(aMock.Object, null); Assert.Throws <ArgumentNullException>(func); }
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); }
public int CompareTo(IRenderable other) { return(RenderableCompare.CompareTo(this, other)); }
public void CompareTo_HandlesANull() { TestDelegate func = () => RenderableCompare.CompareTo(null, null); Assert.Throws <ArgumentNullException>(func); }