Example #1
0
        public void ResetTest()
        {
            ManualConvertor convertor = new ManualConvertor(initData);

            Assert.Equal(-1, convertor.Index);
            convertor.MoveNext();
            Assert.Equal(0, convertor.Index);
        }
Example #2
0
        public void IntegrationTest()
        {
            ManualConvertor convertor = new ManualConvertor(initData);
            var             index     = 0;

            while (convertor.MoveNext())
            {
                var data = convertor.Convert(null);
                Assert.Equal(initData[index], data.ContentText);
                index++;
            }
        }
Example #3
0
        public void ConvertTest()
        {
            ManualConvertor convertor = new ManualConvertor();
            var             data      = convertor.Convert(null);

            Assert.Empty(data.ContentText);

            convertor = new ManualConvertor(initData);
            data      = convertor.Convert(null);
            Assert.Empty(data.ContentText);

            Assert.True(convertor.MoveNext());
            data = convertor.Convert(null);
            Assert.Equal("1", data.ContentText);
        }
Example #4
0
        public void ConstructorTest()
        {
            ManualConvertor convertor = new ManualConvertor();

            Assert.Empty(convertor.ManualData);
        }