예제 #1
0
        public void TestGeneratorAndDispose()
        {
            IteratorValuesWrapper iteratorValuesWrapper = new IteratorValuesWrapper(new ArrayWrapper(new List <StackItem>()));

            Assert.IsNotNull(iteratorValuesWrapper);
            Action action = () => iteratorValuesWrapper.Dispose();

            action.Should().NotThrow <Exception>();
        }
예제 #2
0
        public void TestNextAndValue()
        {
            StackItem        stackItem = new VM.Types.Boolean(true);
            List <StackItem> list      = new List <StackItem>();

            list.Add(stackItem);
            ArrayWrapper          wrapper = new ArrayWrapper(list);
            IteratorValuesWrapper iteratorValuesWrapper = new IteratorValuesWrapper(wrapper);
            Action action = () => iteratorValuesWrapper.Next();

            action.Should().NotThrow <Exception>();
            Assert.AreEqual(stackItem, iteratorValuesWrapper.Value());
        }