Summary description for PlainTextRichTextEditorProvider.
Наследование: Subtext.Extensibility.Providers.BlogEntryEditorProvider
 public void SetControlID()
 {
     string test = "MyTestControlID";
     var provider = new PlainTextBlogEntryEditorProvider();
     provider.ControlId = test;
     Assert.AreEqual(test, provider.ControlId);
 }
 public void SetWidth()
 {
     Unit test = 200;
     var provider = new PlainTextBlogEntryEditorProvider();
     provider.InitializeControl(new Mock<ISubtextContext>().Object);
     provider.Width = test;
     Assert.AreEqual(test, provider.Width);
 }
 public void SetText()
 {
     string test = "Lorem Ipsum";
     var provider = new PlainTextBlogEntryEditorProvider();
     provider.InitializeControl(new Mock<ISubtextContext>().Object);
     provider.Text = test;
     Assert.AreEqual(test, provider.Text);
     Assert.AreEqual(test, provider.Xhtml);
 }
 public void TestInitialization()
 {
     var provider = new PlainTextBlogEntryEditorProvider();
     NameValueCollection coll = GetNameValueCollection();
     provider.Initialize("PlainTextProvider", coll);
     provider.InitializeControl(new Mock<ISubtextContext>().Object);
     Assert.IsTrue(provider.RichTextEditorControl.GetType() == typeof(TextBox));
     var txt = provider.RichTextEditorControl as TextBox;
     Assert.AreEqual(provider.Name, "PlainTextProvider");
     Assert.AreEqual(txt.Rows, 10);
     Assert.AreEqual(txt.Columns, 70);
     Assert.AreEqual(txt.CssClass, "myCssClass");
 }
 public void TestInitializationWithNullConfigValue()
 {
     var provider = new PlainTextBlogEntryEditorProvider();
     UnitTestHelper.AssertThrowsArgumentNullException(() =>
                                                        provider.Initialize("PlainTextProvider", null)
         );
 }
Пример #6
0
 public void SetUp()
 {
     ptrtep = new PlainTextBlogEntryEditorProvider();
 }