public void DemoInterface() { Console.WriteLine("-----------------Interface Example-----------------"); ExampleInterface exampleInterface = new ExampleInterface(4, 5, 6); exampleInterface.ShowArea(); }
public void TestResolverPluginsCreate() { IResolver <Identifier> resolver = new ResolverDynamicAssemblyDirectory("testapplication", AppDomain.CurrentDomain.BaseDirectory, true, _pluginsPath); resolver.Load(); Assert.IsTrue(resolver.CanCreate(new Identifier("ExampleClass")), "Resolver cannot find type"); ExampleInterface obj = resolver.CreateInstance <ExampleInterface>(new Identifier("ExampleClass")); Assert.IsNotNull(obj, "Created ExampleClass object is null"); obj.Message(); Console.WriteLine("Test TestResolverPluginsCreate (\n" + resolver.ToString() + ")"); }
public void TestResolverAssemblyCreate() { ResolverStaticAssemblies resolver = new ResolverStaticAssemblies("testapplication"); resolver.AppendPath(_pluginsPath); resolver.Load(); Identifier identifier = new Identifier(_implAssembly, "ExampleClass"); Console.WriteLine("Before Test TestResolverAssemblyCreate (\n" + resolver.ToString() + ")"); ExampleInterface obj = resolver.CreateInstance <ExampleInterface>(identifier); Assert.IsNotNull(obj, "Created ExampleClass object is null"); obj.Message(); Console.WriteLine("After Test TestResolverAssemblyCreate (\n" + resolver.ToString() + ")"); }
public void Setup() { mocks = new MockRepository(); mock = mocks.StrictMock<ExampleInterface>(); }