public void TestRoundTrip()
        {
            var wn1 = new WordNode("Get", PartOfSpeechTag.Verb);
            var wn2 = new WordNode("Fixed", PartOfSpeechTag.NounModifier);
            var wn3 = new WordNode("Hydro", PartOfSpeechTag.NounModifier);
            var wn4 = new WordNode("Schedule", PartOfSpeechTag.Noun);
            var pn  = new PhraseNode(new[] { wn1, wn2, wn3, wn4 }, Location.Name, false);

            Assert.IsTrue(PhraseNodesAreEqual(pn, PhraseNode.Parse(pn.ToString())));
        }
        public void TestToString()
        {
            var        wn1   = new WordNode("Eat", PartOfSpeechTag.Verb);
            var        wn2   = new WordNode("More", PartOfSpeechTag.NounModifier);
            var        wn3   = new WordNode("Chicken", PartOfSpeechTag.Noun);
            var        words = new WordNode[] { wn1, wn2, wn3 };
            PhraseNode pn    = new PhraseNode(words, Location.Name, true);

            string expected = string.Format("{0} {1} {2}", wn1, wn2, wn3);

            Assert.AreEqual(expected, pn.ToString());
        }
        public void TestToString_EmptyPhrase()
        {
            var pn = new PhraseNode();

            Assert.AreEqual(string.Empty, pn.ToString());
        }
예제 #4
0
 public void TestToString_EmptyPhrase() {
     var pn = new PhraseNode();
     Assert.AreEqual(string.Empty, pn.ToString());
 }
예제 #5
0
        public void TestToString() {
            var wn1 = new WordNode("Eat", PartOfSpeechTag.Verb);
            var wn2 = new WordNode("More", PartOfSpeechTag.NounModifier);
            var wn3 = new WordNode("Chicken", PartOfSpeechTag.Noun);
            var words = new WordNode[] {wn1, wn2, wn3};
            PhraseNode pn = new PhraseNode(words, Location.Name, true);

            string expected = string.Format("{0} {1} {2}", wn1, wn2, wn3);
            Assert.AreEqual(expected, pn.ToString());
        }
예제 #6
0
 public void TestRoundTrip() {
     var wn1 = new WordNode("Get", PartOfSpeechTag.Verb);
     var wn2 = new WordNode("Fixed", PartOfSpeechTag.NounModifier);
     var wn3 = new WordNode("Hydro", PartOfSpeechTag.NounModifier);
     var wn4 = new WordNode("Schedule", PartOfSpeechTag.Noun);
     var pn = new PhraseNode(new[] { wn1, wn2, wn3, wn4 }, Location.Name, false);
     Assert.IsTrue(PhraseNodesAreEqual(pn, PhraseNode.Parse(pn.ToString())));
 }