public void ConstructorAndForm() { NUnitFormArxNet expectedForm = new NUnitFormArxNet(new GuiOptionsArxNet(new string[0])); TestLoaderArxNet expectedLoader = new TestLoaderArxNet(); nUnitPresenterArxNet = new NUnitPresenterArxNet(expectedForm, expectedLoader); Assert.That(nUnitPresenterArxNet.Form, Is.EqualTo(expectedForm)); //private TestLoaderArxNet loader = null; TestLoaderArxNet actualLoader = UnitTestHelper.GetNonPublicField(nUnitPresenterArxNet, "loader") as TestLoaderArxNet; Assert.That(actualLoader, Is.EqualTo(expectedLoader)); }
public void Initialize(TestLoaderArxNet loader) { /* this.tests.Initialize(loader, loader.Events); this.loader = loader; loader.Events.TestLoaded += new NUnit.Util.TestEventHandler(events_TestLoaded); loader.Events.TestReloaded += new NUnit.Util.TestEventHandler(events_TestReloaded); loader.Events.TestUnloaded += new NUnit.Util.TestEventHandler(events_TestUnloaded); */ object value; TestSuiteTreeView tests; //TestTree:private NUnit.UiKit.TestSuiteTreeView tests; //this.tests.Initialize(loader, loader.Events); tests = null; value = GetBaseNoPublicField("tests"); if (value != null) tests = (TestSuiteTreeView)value; if (tests != null) tests.Initialize(loader, loader.Events); this.loader = loader; loader.Events.TestLoaded += new NUnit.Util.TestEventHandler(events_TestLoaded); loader.Events.TestReloaded += new NUnit.Util.TestEventHandler(events_TestReloaded); loader.Events.TestUnloaded += new NUnit.Util.TestEventHandler(events_TestUnloaded); }
public void Initialize(TestLoaderArxNet loader) { if (loader == null) return;//2013-1-10:NUnit.Gui.ArxNet.Tests.NUnitFormArxNetTests.ShowModalDialog测试加 this.tests.Initialize(loader, loader.Events); this.loader = loader; loader.Events.TestLoaded += new NUnit.Util.TestEventHandler(events_TestLoaded); loader.Events.TestReloaded += new NUnit.Util.TestEventHandler(events_TestReloaded); loader.Events.TestUnloaded += new NUnit.Util.TestEventHandler(events_TestUnloaded); }
public void SetUp() { loader = new TestLoaderArxNet(); catcher = new TestEventCatcher(loader.Events); }
private NUnitPresenterArxNet NewPresenter(bool form_loader_null) { NUnitPresenterArxNet presenter = null; if (form_loader_null) { presenter = new NUnitPresenterArxNet(null, null); } else { NUnitFormArxNet form = new NUnitFormArxNet(new GuiOptionsArxNet(new string[0])); TestLoaderArxNet loader = new TestLoaderArxNet(); presenter = new NUnitPresenterArxNet(form, loader); } return presenter; }
// TODO: Use an interface for view and model public NUnitPresenterArxNet(NUnitFormArxNet form, TestLoaderArxNet loader) { this.form = form; this.loader = loader; }