public void MembershipUpgrade_MembershipUpgradeSuccess_WhenUpgradeMembershipIsTrue() { // Arrange _iMembershipUpgrade = new MembershipUpgrade(); //// Act var response = _iMembershipUpgrade.UpgradeMembership(true); //// Assert response.Equals("Upgrade applied"); }
public void MembershipUpgrade_MembershipUpgradeFails_WhenUpgradeMembershipIsFalse() { // Arrange _iMembershipUpgrade = new MembershipUpgrade(); //// Act var response = _iMembershipUpgrade.UpgradeMembership(false); //// Assert response.Equals("Upgrade failed due to an error"); }
/// <summary> /// Constructor to Inject Service Dependecies /// </summary> /// <param name="agent"></param> /// <param name="department"></param> /// <param name="emailNotification"></param> /// <param name="membership"></param> /// <param name="membershipUpgrade"></param> /// <param name="order"></param> /// <param name="packingSlip"></param> /// <param name="packingSlipRoyaltyDep"></param> /// <param name="payment"></param> /// <param name="product"></param> /// <param name="shipping"></param> /// <param name="user"></param> /// <param name="videoSubscription"></param> public PaymentController(IAgent agent, IDepartment department, IEmailNotification emailNotification, IMembership membership, IMembershipUpgrade membershipUpgrade, IOrder order, IPackingSlip packingSlip, IPackingSlipRoyaltyDep packingSlipRoyaltyDep, IPayment payment, IProduct product, IShipping shipping, IUser user, IVideoSubscription videoSubscription) { _agent = agent; _department = department; _emailNotification = emailNotification; _membership = membership; _membershipUpgrade = membershipUpgrade; _order = order; _packingSlip = packingSlip; _packingSlipRoyaltyDep = packingSlipRoyaltyDep; _payment = payment; _product = product; _shipping = shipping; _user = user; _videoSubscription = videoSubscription; }