public void the_configuration_exception_is_thrown_when_the_configuration_is_not_valid() { r1.Stub(x => x.Evaluate(Arg <BottleConfiguration> .Is.NotNull)) .WhenCalled(mi => mi.Arguments[0].As <BottleConfiguration>().RegisterError(new MissingService(typeof(object)))); Exception <BottleConfigurationException> .ShouldBeThrownBy(() => theInstaller.Activate(new IPackageInfo[0], new PackageLog())); }