Example #1
0
        public void controller_should_not_allow_both_compileX2Dtime_and_runX2Dtime_conventions()
        {
            // arrange
            var conventionBuilder = new ApiVersionConventionBuilder();

            conventionBuilder.Controller <StubController>();

            // act
            Action controllerConvention = () => conventionBuilder.Controller(typeof(StubController));

            // assert
            controllerConvention.Should().Throw <InvalidOperationException>();
        }