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();
        }
        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());

            route.Should().NotBeNull();
            route.Id.Should().NotBeEmpty();
        }
예제 #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);

            result.Should().NotBeNull();
        }
예제 #4
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.");
        }
예제 #5
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));
        }