Ejemplo n.º 1
0
        public void GetConnectionStringSettingValueFindsConnectionString()
        {
            var configValue = new NameValueCollection {
                { "connectionStringName", "subtextData" }
            };

            Assert.AreEqual("Server=localhost;Database=SubtextData;Trusted_Connection=True;",
                            ProviderConfigurationHelper.GetConnectionStringSettingValue("connectionStringName",
                                                                                        configValue));
        }
Ejemplo n.º 2
0
        public void ProvideEditor_Default_Is_FtbEditor()
        {
            using (var httpRequest = new HttpSimulator("http://localhost").SimulateRequest())
            {
                //arrange
                BlogEntryEditorProvider provider;

                //act
                ProviderConfigurationHelper.LoadProviderCollection <BlogEntryEditorProvider>("BlogEntryEditor", out provider);

                //post (in test app.config the FtbBlogEntryEditorProvider is selected by default)
                Assert.IsTrue(provider is FtbBlogEntryEditorProvider, "FtbBlogEntryEditorProvider is created by default.");
            }
        }