public void TestVoid() { var impl = new MyImplementation(); var derp = ProxyImplement.HookUp <ITest, MyImplementation>(impl); derp.JustAVoid(); Assert.IsTrue(impl.calledSomething); }
public void TestAdd() { var derp = ProxyImplement.HookUp <ITest, MyImplementation>(new MyImplementation()); var result = derp.Add(1, 2); Assert.AreEqual(result, 3); result = derp.Add(4, 2); Assert.AreEqual(result, 6); }
public void TestString() { var derp = ProxyImplement.HookUp <ITest, MyImplementation>(new MyImplementation()); Assert.AreEqual(derp.Format("pass{0}interface", 4), "pass4interface"); }