public void TestInitializationWithNullConfigValue() { var provider = new PlainTextBlogEntryEditorProvider(); UnitTestHelper.AssertThrowsArgumentNullException(() => provider.Initialize("PlainTextProvider", null) ); }
public void SetControlID() { string test = "MyTestControlID"; var provider = new PlainTextBlogEntryEditorProvider(); provider.ControlId = test; Assert.AreEqual(test, provider.ControlId); }
public void SetHeight() { Unit test = 100; var provider = new PlainTextBlogEntryEditorProvider(); provider.InitializeControl(new Mock <ISubtextContext>().Object); provider.Height = test; Assert.AreEqual(test, provider.Height); }
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"); }