예제 #1
0
    public void Payment_Factory_Creates_Book(int paymentCategory, int membershipPaymentType)
    {
        //Arrange
        var paymentFactory = new PymentProcessingSystem.PaymentFactory.GeneratePaymentFactory();
        var item = new Book();




        //Act
        var actual = paymentFactory.GeneratePaymentAction(1);


        //Assert
        Assert.IsNotNull(actual);
        Assert.IsInstanceOfType(actual, typeof(Book));


    }
예제 #2
0
        public void Payment_Factory_Creates_NewMembership(int paymentCategory, int membershipPaymentType)
        {
            IMembershipPaymentType membershipPayment = new NewMemberShip();
            //Arrange
            var paymentFactory = new PymentProcessingSystem.PaymentFactory.GeneratePaymentFactory();
            var item = new Membership(membershipPayment);




            //Act
            var actual = paymentFactory.GeneratePaymentAction(2,0);


            //Assert
            Assert.IsNotNull(actual);
            Assert.IsInstanceOfType(actual, typeof(Membership));


        }