Ejemplo n.º 1
0
        public void CopyToClipboard()
        {
//			Table
//				Roll	Result	NextTable	Modifier	ff	seer	eee
//					z. This is a test. How to do al inefeed,,,length,,,
//					beer.This is the story that never was,e,,,bb,,


            _TestSingleTon.Instance._SetupForLayoutPanelTests();
            Form             form  = new Form();
            FAKE_LayoutPanel panel = new FAKE_LayoutPanel(CoreUtilities.Constants.BLANK, false);

            form.Controls.Add(panel);

            // needed else DataGrid does not initialize

            form.Show();
            form.Visible = false;

            //NOTE: For now remember that htis ADDS 1 Extra notes
            panel.NewLayout("mynewpanel", true, null);
            FAKE_NoteDataXML_Table test = new FAKE_NoteDataXML_Table(33, 0009);

            test.GuidForNote = "thisguid1";
            test.Caption     = "note1";
            test.CreateParent(panel);

            test.AddRow(new object[3] {
                "1", "value1", "testA"
            });
            test.AddRow(new object[3] {
                "2", "value2", "testB"
            });
            test.AddRow(new object[3] {
                "3", "value3", "testC"
            });

            panel.SaveLayout();
            test.Copy();



            string result = Clipboard.GetText();

            Assert.AreEqual(91, result.Length);


            form.Dispose();
        }
Ejemplo n.º 2
0
        public void InsertRowTest()
        {
            _TestSingleTon.Instance._SetupForLayoutPanelTests();
            Form             form  = new Form();
            FAKE_LayoutPanel panel = new FAKE_LayoutPanel(CoreUtilities.Constants.BLANK, false);

            form.Controls.Add(panel);

            // needed else DataGrid does not initialize

            form.Show();
            form.Visible = false;

            //NOTE: For now remember that htis ADDS 1 Extra notes
            panel.NewLayout("mynewpanel", true, null);
            FAKE_NoteDataXML_Table test = new FAKE_NoteDataXML_Table(33, 0009);

            test.GuidForNote = "thisguid1";
            test.Caption     = "note1";
            test.CreateParent(panel);

            test.AddRow(new object[3] {
                "1", "value1", "testA"
            });
            test.AddRow(new object[3] {
                "2", "value2", "testB"
            });
            test.AddRow(new object[3] {
                "3", "value3", "testC"
            });
            panel.SaveLayout();
            Assert.AreEqual(3, test.RowCount());
            test.GetTablePanel().InsertRow();
            Assert.AreEqual(4, test.RowCount());
            test.GetTablePanel().InsertRow();
            test.GetTablePanel().InsertRow();
            Assert.AreEqual(6, test.RowCount());
            form.Dispose();
        }
Ejemplo n.º 3
0
        public void CopyToClipboard()
        {
            //			Table
            //				Roll	Result	NextTable	Modifier	ff	seer	eee
            //					z. This is a test. How to do al inefeed,,,length,,,
            //					beer.This is the story that never was,e,,,bb,,

            _TestSingleTon.Instance._SetupForLayoutPanelTests();
            Form form = new Form();
            FAKE_LayoutPanel panel = new FAKE_LayoutPanel (CoreUtilities.Constants.BLANK, false);
            form.Controls.Add (panel);

            // needed else DataGrid does not initialize

            form.Show ();
            form.Visible = false;

            //NOTE: For now remember that htis ADDS 1 Extra notes
            panel.NewLayout ("mynewpanel", true, null);
            FAKE_NoteDataXML_Table test = new FAKE_NoteDataXML_Table (33,0009);
            test.GuidForNote = "thisguid1";
            test.Caption = "note1";
            test.CreateParent(panel);

            test.AddRow(new object[3] {"1", "value1", "testA"});
            test.AddRow(new object[3] {"2", "value2", "testB"});
            test.AddRow(new object[3] {"3", "value3", "testC"});

            panel.SaveLayout ();
            test.Copy ();

            string result = Clipboard.GetText();
            Assert.AreEqual(91, result.Length);

            form.Dispose ();
        }
Ejemplo n.º 4
0
        public void InsertRowTest()
        {
            _TestSingleTon.Instance._SetupForLayoutPanelTests();
            Form form = new Form();
            FAKE_LayoutPanel panel = new FAKE_LayoutPanel (CoreUtilities.Constants.BLANK, false);
            form.Controls.Add (panel);

            // needed else DataGrid does not initialize

            form.Show ();
            form.Visible = false;

            //NOTE: For now remember that htis ADDS 1 Extra notes
            panel.NewLayout ("mynewpanel", true, null);
            FAKE_NoteDataXML_Table test = new FAKE_NoteDataXML_Table (33,0009);
            test.GuidForNote = "thisguid1";
            test.Caption = "note1";
            test.CreateParent(panel);

            test.AddRow(new object[3] {"1", "value1", "testA"});
            test.AddRow(new object[3] {"2", "value2", "testB"});
            test.AddRow(new object[3] {"3", "value3", "testC"});
            panel.SaveLayout ();
            Assert.AreEqual (3, test.RowCount());
            test.GetTablePanel().InsertRow();
            Assert.AreEqual (4, test.RowCount());
            test.GetTablePanel().InsertRow();
            test.GetTablePanel().InsertRow();
            Assert.AreEqual (6, test.RowCount());
            form.Dispose ();
        }