public void TestInitialize()
        {
            this._resultRepository = new MockValidationResultRepository();

            KnownUserFactory.Reset(false);
            KnownUserFactory.Configure(secretKey: SharedSecreteEventKey);
            QueueFactory.Reset();
            QueueFactory.Configure();
            SessionValidationController.Configure(validationResultProviderFactory: () => this._resultRepository);

            HttpContext.Current = new HttpContext(
                new HttpRequest("", "http://some.url", "someprop=somevalue&another=value"),
                new HttpResponse(null));
        }
示例#2
0
        public void QueueFactory_GetCancelUrl_Configure_Test()
        {
            QueueFactory.Configure(hostDomain: "testq.queue-it.net");

            string expectedCustomerId = "customerid";
            string expectedEventId    = "eventid";

            string expectedCancelUrl =
                "http://" + expectedCustomerId + ".testq.queue-it.net/cancel.aspx?c=" + expectedCustomerId + "&e=" + expectedEventId;

            IQueue queue = QueueFactory.CreateQueue(expectedCustomerId, expectedEventId);

            string actualQueueUrl = queue.GetCancelUrl();

            Assert.AreEqual(expectedCancelUrl, actualQueueUrl);
        }
示例#3
0
 public void TestInitialize()
 {
     QueueFactory.Reset();
     QueueFactory.Configure();
 }