Exemplo n.º 1
0
        public void RegisterProviderTypes_will_create_log_if_failure()
        {
            using (var record = new LateBoundLogRecord()) {
                var sc = new StartClassProviderRegistration();
                sc.RegisterProviderTypes(new ProviderRegistrationContextImpl());

                Assert.Equal(
                    "Problem executing provider registration method `Carbonfrost.UnitTests.Core.Runtime.StartClassProviderRegistrationTests+PStartProviderRegistrationClass.ErrorRegistrationMethod'",
                    record.LastFailure.Message
                    );
            }
        }
Exemplo n.º 2
0
        public void RootServiceProvider_will_create_log_on_failure()
        {
            var rsp =  new RootServiceProvider(new List <Type> {
                typeof(PServiceRegistration)
            }.GetEnumerator());

            using (var record = new LateBoundLogRecord()) {
                rsp.GetService(typeof(string));

                Assert.Equal(
                    "Problem executing service registration method `Carbonfrost.UnitTests.Core.Runtime.RootServiceProviderTests+PServiceRegistration.ErrorRegistrationMethod'",
                    record.LastFailure.Message
                    );
            }
        }