Пример #1
0
        private static LookaroundNode CreateWithType(LookaroundNode.Types type)
        {
            var node = new LookaroundNode();

            node.InputGroupType.Value = type;
            return(node);
        }
Пример #2
0
        public void VariousGroups_ReturnsLookaroundWithContentsAndType(
            string input,
            string expectedContents,
            LookaroundNode.Types expectedType)
        {
            var result     = ParseGroup.ParseOrThrow(input);
            var lookaround = result as LookaroundNode;

            Assert.Multiple(() =>
            {
                Assert.That(result, Is.Not.Null);
                Assert.That(result, Is.TypeOf <LookaroundNode>());
                Assert.AreEqual(expectedContents, lookaround.Input.GetValue());
                Assert.AreEqual(expectedType, lookaround.InputGroupType.Value);
            });
        }