Пример #1
0
        public void AddUpdateMemberShip_Test(int MembershipId, int CustomerId, string Name, DateTime StartDate, DateTime EndDate, bool IsActive)
        {
            var objModal = new MembershipModal
            {
                CustomerId   = CustomerId,
                Name         = Name,
                MembershipId = MembershipId,
                StartDate    = StartDate,
                EndDate      = EndDate,
                IsActive     = IsActive,
            };

            var objValidator = ObjectModalValidator.Validate(objModal);

            Assert.AreEqual(0, objValidator.Count);
            var result = membership.AddUpdateMembership(objModal);

            Assert.IsNotNull(result);
        }
        public void OrderPlacing_Test(int quantity, PaymentFor paymentCategory, string Name, decimal price, bool IsActive)
        {
            var objModal = new OrderProcessingModal
            {
                IsShipped       = false,
                IsActive        = true,
                Name            = Name,
                OrderDate       = new DateTime(),
                PaymentCategory = paymentCategory,
                Quantity        = quantity,
                Price           = price,
            };

            var objValidator = ObjectModalValidator.Validate(objModal);

            Assert.AreEqual(0, objValidator.Count);
            var result = _orderService.OrderPlacing(objModal);

            Assert.IsNotNull(result);
        }