Ejemplo n.º 1
0
        public void NormalPacketBuilderTest()
        {
            IPacketBuilder         _builder = new NormalPacketBuilder(new NormalChecksumCalculator());
            IXModemProtocolOptions _options = new XModemProtocolOptions();

            RunTest(Tuple.Create(_builder, _options, 127));
            RunTest(Tuple.Create(_builder, _options, 129));
        }
Ejemplo n.º 2
0
        public XModemToolFactory()
        {
            int polynomial = XModemProtocolConfigurationSection.Settings.Polynomial.Value;

            _table = new LookUpTable(polynomial);
            _normalChecksumValidator = new NormalChecksumValidator(_calculator);
            _validator           = new PacketValidator(_normalChecksumValidator);
            _normalPacketBuilder = new NormalPacketBuilder(_calculator);

            _checksumTool = new XModemTool {
                Builder   = _normalPacketBuilder,
                Validator = _validator
            };

            TableChanged();
        }