public void construct_with_path_loads_assembly()
    {
        Testable_MainForm form = new Testable_MainForm(@"..\..\..\TestAssembly\bin\smoketest.examples.dll");

        form.Show();
        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 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 display_full_nested_typename_in_TreeNode()
    {
        Testable_MainForm form = new Testable_MainForm(@"..\..\..\TestAssembly\bin\smoketest.examples.dll");

        form.Show();
        TreeNode asm_node = form.treeViewInternalAssemblies.Nodes.Find("SmokeTest.examples", true)[0];
        TreeNode ns_nodes = asm_node.Nodes[0];
        bool     found    = false;

        foreach (TreeNode node in ns_nodes.Nodes)
        {
            found = (node.Text == "PublicStruct+NestedPublicClass");
            if (found)
            {
                break;
            }
        }
        Assert.IsTrue(found);
        form.Close();
    }
    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();
    }