public void RefreshEndpointMiddleware_PathAndVerbMatching_ReturnsExpected()
        {
            var opts = new RefreshOptions();
            ConfigurationBuilder configurationBuilder = new ConfigurationBuilder();

            configurationBuilder.AddInMemoryCollection(appSettings);
            var config = configurationBuilder.Build();
            var ep     = new RefreshEndpoint(opts, config);
            var middle = new RefreshEndpointMiddleware(null, ep);

            Assert.True(middle.RequestVerbAndPathMatch("GET", "/refresh"));
            Assert.False(middle.RequestVerbAndPathMatch("PUT", "/refresh"));
            Assert.False(middle.RequestVerbAndPathMatch("GET", "/badpath"));
        }
        public void RefreshEndpointMiddleware_PathAndVerbMatching_ReturnsExpected()
        {
            var opts  = new RefreshEndpointOptions();
            var mopts = TestHelpers.GetManagementOptions(opts);
            ConfigurationBuilder configurationBuilder = new ConfigurationBuilder();

            configurationBuilder.AddInMemoryCollection(AppSettings);
            var config = configurationBuilder.Build();
            var ep     = new RefreshEndpoint(opts, config);
            var middle = new RefreshEndpointMiddleware(null, ep, mopts);

            Assert.True(middle.RequestVerbAndPathMatch("GET", "/cloudfoundryapplication/refresh"));
            Assert.False(middle.RequestVerbAndPathMatch("PUT", "/cloudfoundryapplication/refresh"));
            Assert.False(middle.RequestVerbAndPathMatch("GET", "/cloudfoundryapplication/badpath"));
        }