private void AssemblyNullRaisesArgumentNullException()
        {
            var valueBuilder = new ControllerValueBuilder();
            var provider = new Digipolis.Codetable.Internal.CodetableProvider(valueBuilder);

            var ex = Assert.Throws<ArgumentNullException>(() => provider.Load(null));

            Assert.Equal("assembly", ex.ParamName);
        }
        private void CodetableControllerAttributeNaamVoorNaam()
        {
            var valueBuilder = new ControllerValueBuilder();
            var provider = new Digipolis.Codetable.Internal.CodetableProvider(valueBuilder);

            var currentAssembly = typeof(LoadTests).GetTypeInfo().Assembly;
            provider.Load(currentAssembly);

            Assert.Single(provider.Codetables, (ct) => ct.Route == "MijnRoute");
        }
        private void DefaultClassNameVoorRoute()
        {
            var valueBuilder = new ControllerValueBuilder();
            var provider = new Digipolis.Codetable.Internal.CodetableProvider(valueBuilder);

            var currentAssembly = typeof(LoadTests).GetTypeInfo().Assembly;
            provider.Load(currentAssembly);

            Assert.Single(provider.Codetables, (ct) => ct.Route == "CodetableTest1");
        }
        private void ZetCodetablesProperty()
        {
            var valueBuilder = new ControllerValueBuilder();
            var provider = new Digipolis.Codetable.Internal.CodetableProvider(valueBuilder);

            var currentAssembly = typeof(LoadTests).GetTypeInfo().Assembly;
            provider.Load(currentAssembly);

            Assert.NotNull(provider.Codetables);
            Assert.Equal(3, provider.Codetables.Count());
        }
        private void LegeCodetablesPropertyAlsGeenCodetablesInAssembly()
        {
            var valueBuilder = new ControllerValueBuilder();
            var provider = new Digipolis.Codetable.Internal.CodetableProvider(valueBuilder);

            var callingAssembly = Assembly.GetEntryAssembly();
            provider.Load(callingAssembly);

            Assert.NotNull(provider.Codetables);
            Assert.Equal(0, provider.Codetables.Count());
        }
 private void DefaultZonderControllerGeeftDefault()
 {
     var builder = new ControllerValueBuilder();
     var result = builder.GetValueOrDefault("aValueController", "aDefaultValue");
     Assert.Equal("aDefaultValue", result);
 }
 private void DefaultBevatControllerRandomHoofdletterGeeftValueMetDefaultPart()
 {
     var builder = new ControllerValueBuilder();
     var result = builder.GetValueOrDefault("aValueController", "api/[ContRolLEr]");
     Assert.Equal("api/aValue", result);
 }
 private void DefaultIsControllerHoofdletterGeeftValue()
 {
     var builder = new ControllerValueBuilder();
     var result = builder.GetValueOrDefault("aValueController", "[Controller]");
     Assert.Equal("aValue", result);
 }