private void OptionsServicesIsSet()
        {
            var serviceProviderMock = new Mock <IServiceProvider>();

            var optionsSetup = new WebVersioningOptionsSetup(serviceProviderMock.Object);

            Assert.Same(serviceProviderMock.Object, optionsSetup.OptionsServices);
        }
        private void ConventionIsAdded()
        {
            var serviceProviderMock = new Mock <IServiceProvider>();

            var options = new TestWebVersioningOptions(new WebVersioningOptions()
            {
                Route = "myroute"
            });

            serviceProviderMock.Setup(svp => svp.GetService(typeof(IOptions <WebVersioningOptions>))).Returns(options);

            var mvcOptions = new MvcOptions();
            var setup      = new WebVersioningOptionsSetup(serviceProviderMock.Object);

            Assert.Equal(0, mvcOptions.Conventions.Count);

            setup.Configure(mvcOptions);

            Assert.Equal(1, mvcOptions.Conventions.Count);
        }