Exemplo n.º 1
0
        public void GetHtmlTest()
        {
            IOptions options = new OnOptions();

            string result = options.GetOptionString();

            Assert.IsNotNull(result);
        }
Exemplo n.º 2
0
        public void GetHtmlWithOptionsTest()
        {
            IOptions options = new OnOptions
            {
                PaymentCancel  = "cancel",
                PaymentError   = "error",
                PaymentSuccess = "success"
            };

            string result = options.GetOptionString();

            Assert.IsNotNull(result);
            Assert.IsTrue(result.Contains("V.on(\"payment.success\", function(payment){success});"));
            Assert.IsTrue(result.Contains("V.on(\"payment.error\", function(payment){error});"));
            Assert.IsTrue(result.Contains("V.on(\"payment.cancel\", function(payment){cancel});"));
        }