Пример #1
0
        public Auth()
        {
            InitializeComponent();
            PropsLoader Loader = new PropsLoader();

            Loader.LoadSqlText();
        }
Пример #2
0
        public void LoaderTest()
        {
            string      expected = "server=127.0.0.2;user=root;database=scoringdb;port=3306;password=3453456";
            PropsLoader loader   = new PropsLoader();

            loader.LoadSqlText();
            string actual = loader.SQLText;

            Assert.AreEqual(expected, actual);
        }
Пример #3
0
        public void PropsSaveTest()
        {
            PropsPage propsPage = new PropsPage();

            propsPage.Boxes[0].Text = "0";
            propsPage.Boxes[1].Text = "1";
            propsPage.Boxes[2].Text = "2";
            propsPage.Boxes[3].Text = "3";
            propsPage.Boxes[4].Text = "4";
            string expected = "server=0; user=1;database=2;port=3;password=4";

            PropsSaver propsSaver = new PropsSaver();

            propsSaver.SaveProps(propsPage.Boxes);

            PropsLoader propsLoader = new PropsLoader();

            propsLoader.LoadSqlText();

            Assert.AreEqual(expected, propsLoader.SQLText);
        }