private void AssertHandlerComparison(Type handlerClass, object smaller, object greater ) { IComparable4 handler = (IComparable4)NewInstance(handlerClass); AssertHandlerComparison(handler, smaller, greater); }
private void AssertHandlerComparison(IComparable4 handler, object smaller, object greater) { IPreparedComparison comparable = handler.PrepareComparison(Context(), smaller); Assert.IsNotNull(comparable); Assert.AreEqual(0, comparable.CompareTo(smaller)); Assert.IsSmaller(0, comparable.CompareTo(greater)); comparable = handler.PrepareComparison(Context(), greater); Assert.IsNotNull(comparable); Assert.AreEqual(0, comparable.CompareTo(greater)); Assert.IsGreater(0, comparable.CompareTo(smaller)); comparable = handler.PrepareComparison(Context(), null); Assert.IsNotNull(comparable); Assert.AreEqual(0, comparable.CompareTo(null)); Assert.IsSmaller(0, comparable.CompareTo(smaller)); }