public void TestActivateMembership() { IMembership membership = new Membership(); membership.ActivateMembership(); Assert.IsTrue(true); }
public void When_payment_for_membership_is_received_Activate_membership_Is_Successful_and_Email_is_sent() { const string inputOrder = "membership - new"; iSendEmailMock.Setup(a => a.SendEmailToMember(It.IsAny <string>())); var packageSlip = _membership.ActivateMembership(inputOrder); iSendEmailMock.Verify(a => a.SendEmailToMember(It.IsAny <string>()), Times.AtLeastOnce); packageSlip.Should().Be("Membership activated and email sent"); }
private string ProcessMembership() { string _output; IMembership membership = new Membership(); _output = membership.ActivateMembership(); IEmail email = new Email(); _output += "," + email.GenerateEmail(_productType); return(_output); }
/// <summary> /// This method calculates Membership pAmount /// </summary> /// <param name="item">The Product item</param> /// <param name="categoryId">The Category id</param> private void MembershipAmountCalculator(ProductItem item, int categoryId) { Membership membership = new Membership(); if (categoryId == 3) { item.ProductUnitPrice = 1000.00;//for tesing purpose membership.ActivateMembership(); } else if (categoryId == 4) { item.ProductUnitPrice = 500.00;//for tesing purpose membership.UpgradeMembership(); } var totalAmount = membership.CalculateAmount(item); lblTotalAmountVal.Text = String.Format("{0:0.00}", totalAmount); membership.SendMail(); }