public void LoadSomethingNotThere()
        {
            _setupforlayoutests();

            // this one needs to create the database

            FakeLayoutDatabase layout = new FakeLayoutDatabase("testguid");
            //	LayoutPanel layoutPanel = new LayoutPanel(CoreUtilities.Constants.BLANK, false);
            //layoutPanel.NewLayout("testguid", false, null);
            //	layoutPanel.LoadLayout("testguid", false, null);
            bool result = layout.LoadFrom(null);

            _w.output("made it");
            Assert.AreEqual(false, result);
        }
        public void LoadSomethingNotThere()
        {
            _setupforlayoutests();

            // this one needs to create the database

            FakeLayoutDatabase layout = new FakeLayoutDatabase ("testguid");
            //	LayoutPanel layoutPanel = new LayoutPanel(CoreUtilities.Constants.BLANK, false);
            //layoutPanel.NewLayout("testguid", false, null);
            //	layoutPanel.LoadLayout("testguid", false, null);
            bool result = layout.LoadFrom(null);
            _w.output("made it");
            Assert.AreEqual(false, result);
        }
        public void CountSpecificSubType()
        {
            //-- do unit tests counting store 6 textboxes and know this (countbytype)

            System.Windows.Forms .Form form = new System.Windows.Forms.Form();
            _TestSingleTon.Instance._SetupForLayoutPanelTests();

            int count = 25;
            //	FakeLayoutDatabase layout = new FakeLayoutDatabase ("testguid");
            FAKE_LayoutPanel layoutPanel = new FAKE_LayoutPanel (CoreUtilities.Constants.BLANK, false);
            layoutPanel.NewLayout("testguid", true, null);

            // jan152013 - tweak to allow this to work with new system without rewriting all the tstings in LayoutDatabasetest
            LayoutDatabase layout = layoutPanel.GetLayoutDatabase();

            form.Controls.Add (layoutPanel);
            form.Show ();

            NoteDataXML note = new NoteDataXML ();
            for (int i = 0; i < count; i++) {

                note.Caption = "boo" + i.ToString ();
                layout.Add (note);
                note.CreateParent(layoutPanel);
            }
            _w.output (String.Format ("{0} Notes in Layout before save", layout.GetNotes ().Count.ToString ()));

            for (int i = 0; i < 6; i++) {
                note = new NoteDataXML_RichText ();

                note.Caption = "richText";
                layout.Add (note);
                note.CreateParent(layoutPanel);
            }

            layout.SaveTo();

            //	_w.output(String.Format ("{0} Objects Saved", layout.ObjectsSaved().ToString()));
            layout = new FakeLayoutDatabase ("testguid");

            layout.LoadFrom(layoutPanel);

            // now count RichText notes
            int count2 = 0;
            foreach (NoteDataInterface _note in layout.GetNotes ())
            {
                if (_note.GetType() == typeof(NoteDataXML_RichText))
                    {
                    count2++;
                }

                }

            _w.output(String.Format ("{0} Objects Loaded", layout.GetNotes().Count));

            // added linktable
            Assert.AreEqual (7, count2);
        }
        public void CountSpecificSubType()
        {
            //-- do unit tests counting store 6 textboxes and know this (countbytype)

            System.Windows.Forms.Form form = new System.Windows.Forms.Form();
            _TestSingleTon.Instance._SetupForLayoutPanelTests();


            int count = 25;
            //	FakeLayoutDatabase layout = new FakeLayoutDatabase ("testguid");
            FAKE_LayoutPanel layoutPanel = new FAKE_LayoutPanel(CoreUtilities.Constants.BLANK, false);

            layoutPanel.NewLayout("testguid", true, null);

            // jan152013 - tweak to allow this to work with new system without rewriting all the tstings in LayoutDatabasetest
            LayoutDatabase layout = layoutPanel.GetLayoutDatabase();

            form.Controls.Add(layoutPanel);
            form.Show();

            NoteDataXML note = new NoteDataXML();

            for (int i = 0; i < count; i++)
            {
                note.Caption = "boo" + i.ToString();
                layout.Add(note);
                note.CreateParent(layoutPanel);
            }
            _w.output(String.Format("{0} Notes in Layout before save", layout.GetNotes().Count.ToString()));

            for (int i = 0; i < 6; i++)
            {
                note = new NoteDataXML_RichText();

                note.Caption = "richText";
                layout.Add(note);
                note.CreateParent(layoutPanel);
            }

            layout.SaveTo();

            //	_w.output(String.Format ("{0} Objects Saved", layout.ObjectsSaved().ToString()));
            layout = new FakeLayoutDatabase("testguid");

            layout.LoadFrom(layoutPanel);

            // now count RichText notes
            int count2 = 0;

            foreach (NoteDataInterface _note in layout.GetNotes())
            {
                if (_note.GetType() == typeof(NoteDataXML_RichText))
                {
                    count2++;
                }
            }

            _w.output(String.Format("{0} Objects Loaded", layout.GetNotes().Count));


            // added linktable
            Assert.AreEqual(7, count2);
        }