public void user_loaded_assembly_are_added_to_external_TreeView() { Testable_MainForm form = new Testable_MainForm(); form.Show(); form.LoadAssemblyPath(@"..\..\..\TestAssembly\bin\smoketest.examples.dll"); Assert.IsTrue(form.treeViewExternalAssemblies.Nodes.ContainsKey("SmokeTest.examples")); form.Close(); }
public void External_tab_not_selected_on_user_load_when_select_is_false() { Testable_MainForm form = new Testable_MainForm(); form.Show(); form.LoadAssemblyPath(@"..\..\..\TestAssembly\bin\smoketest.examples.dll", false); Assert.AreSame(form.tabControlAssemblies.TabPages[0], form.tabControlAssemblies.SelectedTab); form.Close(); }
public void LoadAssemblyPath_handles_exceptions() { Testable_MainForm form = new Testable_MainForm(); exception_handler_was_invoked = false; form.exception_handler = new ExceptionHandler(OnException); form.LoadAssemblyPath("path that throws.bad"); Assert.IsTrue(exception_handler_was_invoked); }
public void External_tree_node_selection_initializes_SmokeTestControl_for_type() { Testable_MainForm form = new Testable_MainForm(); form.Show(); form.LoadAssemblyPath(@"..\..\..\TestAssembly\bin\smoketest.examples.dll"); TreeNode ns = form.treeViewExternalAssemblies.Nodes[0].Nodes[0]; TreeNode found = null; foreach (TreeNode node in ns.Nodes) { found = node; if (node.Text == "PublicClass") { break; } } TreeViewEventArgs e = new TreeViewEventArgs(found); form.OnExternalAssembyNodeSelected(null, e); Assert.AreEqual("PublicClass()", form.instance.listBoxConstructors.Items[0].ToString()); form.Close(); }