Ejemplo n.º 1
0
        public void DsEmptyDecimalPropertyLoadTest()
        {
            var ds = new DsParameters();

            ds.Load("RXX000000001234521215000X            ");
            Assert.Equal(0, ds.EmptyDecimal);
        }
Ejemplo n.º 2
0
        public void NegativeDecimalDsLoadTest()
        {
            var    ds       = new DsParameters();
            string loadedDs = "RXX00000000123452121500CX    00000000";

            ds.Clear();
            ds.Load(loadedDs);

            Assert.Equal(ds.Amount, -21.5003m);
        }
Ejemplo n.º 3
0
        public void DataStructureDumpTest()
        {
            var ds = new DsParameters
            {
                LdaUnknown      = "R",
                LdaId           = "XX",
                LdaDate         = "00000000",
                LdaCompany      = "12345",
                RankId          = 1,
                RankNumber      = 2,
                Amount          = 21.50m,
                PaddedParameter = "X"
            };

            var dumpedDS = ds.Dump();

            Assert.Equal("RXX000000001234521215000X    00000000", dumpedDS);
        }
Ejemplo n.º 4
0
        public void DataStructureClearTest()
        {
            var ds = new DsParameters
            {
                LdaId           = "XX",
                LdaDate         = "00000000",
                LdaCompany      = "12345",
                RankId          = 1,
                RankNumber      = 2,
                Amount          = 21.50m,
                PaddedParameter = "X"
            };

            ds.Clear();

            Assert.Equal(0, ds.Amount);
            Assert.Null(ds.PaddedParameter);
        }