Beispiel #1
0
        public void MenuUtility_Add_2()
        {
            MenuFile menu = new MenuFile();

            menu.Add <object>("a", null);
            Assert.AreEqual(string.Empty, menu.GetString("a"));
        }
Beispiel #2
0
        public void MenuFile_Constructor_1()
        {
            MenuFile menu = _GetMenu();

            Assert.AreEqual(3, menu.Entries.Count);
            string actual = menu.GetString("c");

            Assert.AreEqual("Comment for c", actual);

            _TestSerialization(menu);
        }
Beispiel #3
0
        public void MenuFile_LoadLocalFile_1()
        {
            string fileName = Path.Combine
                              (
                TestDataPath,
                "ORG.MNU"
                              );

            MenuFile menu = MenuFile
                            .ParseLocalFile(fileName);

            Assert.AreEqual(9, menu.Entries.Count);

            string actual = menu.GetString("1");

            Assert.AreEqual("RU", actual);
        }