Пример #1
0
        public MultiserialIntegrationTester(string[] stimulus)
        {
            StimulusDescriptor.LoadFrom(stimulus);
            TestPatternGenerator testPatternGenerator = new TestPatternGenerator();

            testPattern = new List <string>();
            testPatternGenerator.ForeachState((w, s) =>
            {
                testPattern.Add(string.Format("{0} {1:X4}", w, s));
            });
        }
Пример #2
0
        private void TestPatternChecker(string[] testProgram, string[] expectedResult)
        {
            int i = 0;

            StimulusDescriptor.LoadFrom(testProgram);
            TestPatternGenerator testPattern = new TestPatternGenerator();

            testPattern.ForeachState((w, s) =>
            {
                string ss = string.Format("{0:0000} {1:X8}", w, s);
                Console.WriteLine("ss {0}", ss);
                Assert.AreEqual(expectedResult[i++], ss);
            });
            Assert.AreEqual(expectedResult.Length, i);
        }