Пример #1
0
        public ResponseBaseValidationTests()
        {
            ProtocolSettings = ProtocolSettings.CreateEmpty();
            Validator        = new LikePharmaValidator(ProtocolSettings);

            ValidValue.Status    = Globals.StatusSuccess;
            ValidValue.ErrorCode = Globals.ErrorCodeNoError;
#pragma warning disable CA1303 // Do not pass literals as localized parameters
            ValidValue.Message = "Hello, World";
#pragma warning restore CA1303 // Do not pass literals as localized parameters
        }
        public RegisterRequestValidationTests()
        {
            this.protocolSettings = ProtocolSettings.CreateEmpty();
            this.validator        = new LikePharmaValidator(protocolSettings);

            validValue = new RegisterRequest
            {
                PosId       = "A12BC",
                CardNumber  = "12345",
                PhoneNumber = "12345",
                TrustKey    = "abc",
            };
        }
        public ConfirmPurchaseRequestValidationTests()
        {
            this.protocolSettings = ProtocolSettings.CreateEmpty();
            this.validator        = new LikePharmaValidator(protocolSettings);

            validValue = new ConfirmPurchaseRequest
            {
                PosId        = "A12BC",
                CardNumber   = "1234567890123",
                Transactions = new List <string>()
                {
                    "abc123", "abcd1234"
                },
            };
        }
        public GetDiscountRequestValidationTests()
        {
            this.protocolSettings = ProtocolSettings.CreateEmpty();
            this.validator        = new LikePharmaValidator(protocolSettings);

            validValue = new GetDiscountRequest
            {
                PosId      = PosIdAttributeTests.ValidPosIdValue,
                CardNumber = "12345",
                AnyData    = "Hello, World!",
                Orders     = new List <GetDiscountRequest.Order>
                {
                    new GetDiscountRequest.Order
                    {
                        Barcode = "1234567890123",
                        Count   = 11,
                        Price   = 123.45M,
                        AnyData = "AnyData1",
                    },
                },
            };
        }