public void TestEbcdic1()
        {
            var session = new MockTaskSession(new MockTaskConfig {
                Origin = 1
            });

            session.VerifyStart();

            session.VerifyCommand(() => session.Ebcdic(1, 2, 3), "Ebcdic(0,1,3)");
            session.VerifyCommand(() => session.Ebcdic(1, 2, 3, 4), "Ebcdic(0,1,3,4)");

            Assert.Throws <ArgumentOutOfRangeException>(() => session.Ebcdic(0, 2, 3));
            Assert.Throws <ArgumentOutOfRangeException>(() => session.Ebcdic(1, 0, 3));

            session.Close();
        }
        public void TestEbcdic()
        {
            var session = new MockTaskSession();

            session.VerifyStart();

            session.VerifyCommand(() => session.Ebcdic(), "Ebcdic()");
            session.VerifyCommand(() => session.Ebcdic(10), "Ebcdic(10)");
            session.VerifyCommand(() => session.Ebcdic(1, 2, 3), "Ebcdic(1,2,3)");
            session.VerifyCommand(() => session.Ebcdic(1, 2, 3, 4), "Ebcdic(1,2,3,4)");

            Assert.Throws <ArgumentOutOfRangeException>(() => session.Ebcdic(-1, 2, 3));
            Assert.Throws <ArgumentOutOfRangeException>(() => session.Ebcdic(1, -1, 3));
            Assert.Throws <ArgumentOutOfRangeException>(() => session.Ebcdic(-1, 1, 3, 4));
            Assert.Throws <ArgumentOutOfRangeException>(() => session.Ebcdic(1, -1, 3, 4));

            // Force some exceptions.
            session.ExceptionMode = true;
            session.AllFail       = true;
            Assert.Throws <X3270ifCommandException>(() => session.Ebcdic());
            Assert.Throws <X3270ifCommandException>(() => session.Ebcdic(1));
            Assert.Throws <X3270ifCommandException>(() => session.Ebcdic(1, 2, 3));
            Assert.Throws <X3270ifCommandException>(() => session.Ebcdic(1, 2, 3, 4));

            session.Close();
        }