public void Dispose()
 {
     GuiOptionsArxNet expectedGuiOptions = new GuiOptionsArxNet(new string[0]);
     nUnitFormArxNet = new NUnitFormArxNet(expectedGuiOptions);
     object[] args = new object[] { true };
     UnitTestHelper.CallNonPublicMethod(nUnitFormArxNet, "Dispose", args);
 }
        public void HelpTextUsesCorrectDelimiterForPlatform()
        {
            string helpText = new GuiOptionsArxNet(new String[] {"Tests.dll"} ).GetHelpText();
            char delim = System.IO.Path.DirectorySeparatorChar == '/' ? '-' : '/';

            string expected = string.Format( "{0}config=", delim );
            StringAssert.Contains( expected, helpText );
        }
 public void ShowModelessDialog()
 {
     SettingsServiceArxNet settingsService = new SettingsServiceArxNet();
     ServiceManager.Services.AddService(settingsService);
     ServiceManager.Services.AddService(new DomainManager());
     ServiceManager.Services.AddService(new RecentFilesService());
     ServiceManager.Services.AddService(new ProjectService());
     ServiceManager.Services.AddService(new TestLoaderArxNet(new GuiTestEventDispatcherArxNet()));
     ServiceManager.Services.AddService(new AddinRegistry());
     ServiceManager.Services.AddService(new AddinManager());
     ServiceManager.Services.AddService(new TestAgency());
     ServiceManager.Services.InitializeServices();
     AppContainer c = new AppContainer();
     AmbientProperties ambient = new AmbientProperties();
     c.Services.AddService(typeof(AmbientProperties), ambient);
     GuiOptionsArxNet guiOptions = new GuiOptionsArxNet(new string[0]);
     nUnitFormArxNet = new NUnitFormArxNet(guiOptions);
     c.Add(nUnitFormArxNet);
     nUnitFormArxNet.Show();
 }
 public void Constructor()
 {
     GuiOptionsArxNet expectedGuiOptions = new GuiOptionsArxNet(new string[0]);
     nUnitFormArxNet = new NUnitFormArxNet(expectedGuiOptions);
     Assert.That(nUnitFormArxNet, Is.Not.Null);
     //private GuiOptionsArxNet guiOptions;
     GuiOptionsArxNet actualGuiOptions = UnitTestHelper.GetNonPublicField(nUnitFormArxNet, "guiOptions") as GuiOptionsArxNet;
     Assert.That(actualGuiOptions, Is.EqualTo(expectedGuiOptions));
     //private RecentFiles recentFilesService;
     RecentFiles expectedRecentFilesService = ServicesArxNet.RecentFiles;
     RecentFiles actualRecentFilesService = UnitTestHelper.GetNonPublicField(nUnitFormArxNet, "recentFilesService") as RecentFiles;
     Assert.That(actualRecentFilesService, Is.EqualTo(expectedRecentFilesService));
     //private ISettings userSettings;
     ISettings expectedUserSettings = ServicesArxNet.UserSettings;
     ISettings actualUserSettings = UnitTestHelper.GetNonPublicField(nUnitFormArxNet, "userSettings") as ISettings;
     Assert.That(actualUserSettings, Is.EqualTo(expectedUserSettings));
     //private NUnitPresenterArxNet presenter = null;
     NUnitPresenterArxNet actualPresenter = UnitTestHelper.GetNonPublicField(nUnitFormArxNet, "presenter") as NUnitPresenterArxNet;
     Assert.That(actualPresenter.Form, Is.EqualTo(nUnitFormArxNet));
     TestLoaderArxNet actualLoader = UnitTestHelper.GetNonPublicField(actualPresenter, "loader") as TestLoaderArxNet;
     //private TestLoaderArxNet TestLoader
     TestLoaderArxNet expectedLoader = UnitTestHelper.GetNonPublicProperty(nUnitFormArxNet, "TestLoader") as TestLoaderArxNet;
     Assert.That(actualLoader, Is.EqualTo(expectedLoader));
 }
 public void ValidateSuccessful()
 {
     GuiOptionsArxNet options = new GuiOptionsArxNet(new string[] { "nunit.tests.dll" });
     Assert.IsTrue(options.Validate(), "command line should be valid");
 }
 public void ShortHelp()
 {
     GuiOptionsArxNet options = new GuiOptionsArxNet(new string[] {"-?"});
     Assert.IsTrue(options.help);
 }
 public void NoParametersCount()
 {
     GuiOptionsArxNet options = new GuiOptionsArxNet(new string[] {});
     Assert.IsTrue(options.NoArgs);
 }
 public void NoNameValuePairs()
 {
     GuiOptionsArxNet parser = new GuiOptionsArxNet(new String[]{"TestFixture", "Tests.dll"});
     Assert.IsFalse(parser.Validate());
 }
 public void InvalidCommandLineParms()
 {
     GuiOptionsArxNet parser = new GuiOptionsArxNet(new String[]{"-garbage:TestFixture", "-assembly:Tests.dll"});
     Assert.IsFalse(parser.Validate());
 }
 public void InvalidArgs()
 {
     GuiOptionsArxNet options = new GuiOptionsArxNet(new string[] { "-asembly:nunit.tests.dll" });
     Assert.IsFalse(options.Validate());
 }
 public void AssemblyName()
 {
     string assemblyName = "nunit.tests.dll";
     GuiOptionsArxNet options = new GuiOptionsArxNet(new string[]{ assemblyName });
     Assert.AreEqual(assemblyName, options.Parameters[0]);
 }