コード例 #1
0
        public void SimpleLine()
        {
            const string text = "Record          : MSF000-RECORD / MIMS";
            IModelParser parser = new RecordParser();

            IReader reader = Reader.CreateStringReader(text);
            Assert.That(parser.Matches(reader), Is.True);
            IModel model = parser.Parse(reader);
            Assert.That(model, Is.Not.Null);
            Assert.That(model, Is.InstanceOf<StringModel>());

            Assert.That(model.ToString(), Is.EqualTo("[Record] MSF000-RECORD / MIMS"));
        }
コード例 #2
0
        public void SimpleLine()
        {
            const string text   = "Record          : MSF000-RECORD / MIMS";
            IModelParser parser = new RecordParser();

            IReader reader = Reader.CreateStringReader(text);

            Assert.That(parser.Matches(reader), Is.True);
            IModel model = parser.Parse(reader);

            Assert.That(model, Is.Not.Null);
            Assert.That(model, Is.InstanceOf <StringModel>());

            Assert.That(model.ToString(), Is.EqualTo("[Record] MSF000-RECORD / MIMS"));
        }