public void SetConfiguration_throws_if_an_attempt_is_made_to_set_a_different_configuration_type()
            {
                var manager = CreateManager();

                var configuration1             = new FakeConfiguration();
                var mockInternalConfiguration1 = CreateMockInternalConfiguration(configuration1);

                var configuration2             = new Mock <DbConfiguration>().Object;
                var mockInternalConfiguration2 = CreateMockInternalConfiguration(configuration2);

                manager.SetConfiguration(mockInternalConfiguration1.Object);

                Assert.Equal(
                    Strings.ConfigurationSetTwice(configuration2.GetType().Name, configuration1.GetType().Name),
                    Assert.Throws <InvalidOperationException>(() => manager.SetConfiguration(mockInternalConfiguration2.Object)).Message);
            }
            public void SetConfiguration_throws_if_an_attempt_is_made_to_set_a_different_configuration_type()
            {
                var manager = CreateManager();
                var configuration1 = new FakeConfiguration();
                var configuration2 = new Mock<DbConfiguration>().Object;

                manager.SetConfiguration(configuration1);

                Assert.Equal(
                    Strings.ConfigurationSetTwice(configuration2.GetType().Name, configuration1.GetType().Name),
                    Assert.Throws<InvalidOperationException>(() => manager.SetConfiguration(configuration2)).Message);
            }