public void BuildUrlIsSandboxTest() { IOptions options = new ButtonOptions(); string result = options.GetOptionString(); Assert.IsNotNull(result); Assert.IsTrue(result.Contains("<image")); Assert.IsTrue(result.Contains("class=\"v-button\"")); Assert.IsTrue(result.Contains(ButtonOptions.SandboxButtonUrl)); }
public void BuildUrlTest() { VisaHelper.Environment.IsSandbox = false; IOptions options = new ButtonOptions(); string result = options.GetOptionString(); Assert.IsNotNull(result); Assert.IsTrue(result.Contains("<image")); Assert.IsTrue(result.Contains("class=\"v-button\"")); Assert.IsTrue(result.Contains(ButtonOptions.ProductionButtonUrl)); }
public void BuildUrlWithOptionsTest() { VisaHelper.Environment.IsSandbox = false; IOptions options = new ButtonOptions { CardBrands = SupportedCards.AMEX | SupportedCards.VISA, Color = ButtonColors.Neutral, Size = ButtonSizes.Large }; string result = options.GetOptionString(); Assert.IsNotNull(result); Assert.IsTrue(result.Contains("<image")); Assert.IsTrue(result.Contains("class=\"v-button\"")); Assert.IsTrue(result.Contains(ButtonOptions.ProductionButtonUrl)); Assert.IsTrue(result.Contains("cardBrands=VISA,AMEX")); Assert.IsTrue(result.Contains("color=neutral")); Assert.IsTrue(result.Contains("size=425")); }