Пример #1
0
        public void the_new_route_should_be_returned()
        {
            var route = MailgunClientBuilder.GetClient().CreateRoute(1, "catch all that does nothing test for mnailgun", RouteFilter.CatchAll(), RouteAction.InvokeWebHook(new Uri("http://foobar.com/messages")), RouteAction.Stop());

            Assert.IsNotNull(route);

            Assert.IsNotNullOrEmpty(route.Id);
        }
Пример #2
0
        public void the_new_route_should_be_returned()
        {
            var route = MailgunClientBuilder.GetClient().CreateRoute(1, "catch all that does nothing test for mnailgun", RouteFilter.CatchAll(), RouteAction.Stop());

            Assert.IsNotNull(route);

            Assert.IsFalse(string.IsNullOrEmpty(route.Id));
        }
Пример #3
0
        public void the_new_route_should_be_deleted()
        {
            var client = MailgunClientBuilder.GetClient();

            var route  = client.CreateRoute(1, "catch all that does nothing test for mnailgun", RouteFilter.CatchAll(), RouteAction.Stop());
            var result = client.DeleteRoute(route.Id);

            Assert.IsNotNull(result);
        }
        public void the_new_route_should_be_returned()
        {
            var route = MailgunClientBuilder.GetClient().CreateRoute(1, "catch all that does nothing test" +
                                                                     " for mailgun", RouteFilter.CatchAll(),
                                                                     RouteAction.Stop());

            route.Should().NotBeNull();
            route.Id.Should().NotBeEmpty();
        }
Пример #5
0
        public void the_new_route_should_be_returned()
        {
            Action act = () => MailgunClientBuilder.GetClient().CreateRoute(
                1,
                "catch all that does nothing test for mnailgun",
                RouteFilter.MatchRecipient("*@foobar.com"),
                RouteAction.Stop());

            act.Should().Throw <InvalidOperationException>()
            .WithMessage("The 'match_reciptient' function is not recognized.");
        }
Пример #6
0
        public void a_list_of_routes_should_be_returned()
        {
            int count;
            var routes = MailgunClientBuilder.GetClient().GetRoutes(0, 10, out count);

            Assert.IsTrue(count > 0);

            foreach (var route in routes)
            {
                Assert.IsFalse(string.IsNullOrEmpty(route.Id));
            }
        }
Пример #7
0
        public void a_list_of_routes_should_be_returned()
        {
            int count;
            var routes = MailgunClientBuilder.GetClient().GetRoutes(0, 10, out count);

            count.Should().BeGreaterThan(0);

            foreach (var route in routes)
            {
                route.Id.Should().NotBeNullOrEmpty();
            }
        }