public void StaticPrototypeCallTest() { GenericStorage<int>.StaticPrototype.IntroduceItself = (self) => { return "test"; }; GenericStorage<int> a = new GenericStorage<int>(10); Assert.That(a.IntroduceItself() == "test"); }
public void SimplePrototypeCallTest() { GenericStorage<int> a = new GenericStorage<int>(10); string[] strs = { a.IntroduceItself(), a.IntroduceItself("Hello, i am"), a.xIntroduceItself(), a.xIntroduceItself("Hello, i am") }; Assert.That(strs.All(s => s == "Hello, i am System.Int32")); }