Inheritance: ProjectNodeBase
Exemplo n.º 1
0
        public void TestBrokenTranslationMissingArrow()
        {
            ProjectSerializer ps = new ProjectSerializer("a b c\n", null, null);

            TranslationNode tn = new TranslationNode(ps);

            Assert.IsFalse(tn.Successful);
        }
Exemplo n.º 2
0
        public void TestWorkingTranslation()
        {
            ProjectSerializer ps = new ProjectSerializer("a b c => d e f\n", null, null);

            TranslationNode tn = new TranslationNode(ps);

            Assert.IsTrue(tn.Successful);
            Assert.AreEqual(new string[] { "a", "b", "c" }, tn.Source.ToArray());
            Assert.AreEqual(new string[] { "d", "e", "f" }, tn.Destination.ToArray());
        }
Exemplo n.º 3
0
        public override bool LoadSingleItem()
        {
            TranslationNode tn = new TranslationNode(m_serializer);

            if (tn.Successful)
            {
                Children.Add(tn);
            }

            return(true);
        }