public void Shoud_match_by_type()
        {
            //arrange
            var sut = new CqrsEndpointsBuilder();

            sut.UsePostCommand <TestCommand1>("/api/someotherpath")
            .UseDeleteCommand <TestCommand2>("/api/someotherpath");

            //act
            var result = sut.GetTypeForEndpoint("/api/someotherpath", "DELETE");

            //assert
            result.Should().BeEquivalentTo(new EndpointResult
            {
                Type = typeof(TestCommand2),
                PatternSegmentObjects = new Dictionary <string, object>()
            });
        }
        public void Shoud_match_guid_post_pattern()
        {
            //arrange
            var sut = new CqrsEndpointsBuilder();

            sut.UsePostCommand <TestCommand1>("/api/somepath")
            .UsePostCommand <TestCommand2>("/api/someotherpath/{ruleId:Guid}");

            //act
            var result = sut.GetTypeForEndpoint("/api/someotherpath/EC8FD7B7-B82F-4690-BF16-4EFA24B5C649", "POST");

            //assert
            result.Should().BeEquivalentTo(new EndpointResult
            {
                Type = typeof(TestCommand2),
                PatternSegmentObjects = new Dictionary <string, object>
                {
                    { "ruleId", Guid.Parse("EC8FD7B7-B82F-4690-BF16-4EFA24B5C649") }
                }
            });
        }