public void MethodComposeTest() { var import = new MethodToImport(); var host = new AddinHost(); host.Compose(import); Assert.IsNotNull(import.DoInstance); import.DoInstance("hello world!"); Assert.IsNotNull(import.DoStatic); import.DoStatic(-1); import.EventWithReturnValue += MethodToExport.EventHandler; import.EventWithReturnValue += MethodToExport.OtherEventHandler; var str = import.OnEventWithReturnValue(); Assert.AreEqual(MethodToExport.OtherEventHandler(), str); }
public void ComposeTest() { var host = new AddinHost(); var importer = new ViewFactory(); host.Compose(importer); }