public void OutputEncoded_NullString_OutputsEmpty() { TestableView view = new TestableView(); string input = null; string expected = string.Empty; string actual = GetFrom(view, delegate { view.OutputEncoded(input); }); Assert.AreEqual(expected, actual); }
public void Output_Object_OutputsToString() { var view = new TestableView(); var input = new SillyString("<a href='ken'>egozi</a>"); var expected = "<a href='ken'>egozi</a>"; var actual = GetFrom(view, delegate { view.Output(input); }); Assert.AreEqual(expected, actual); }
public void Output_Object_OutputsToString() { TestableView view = new TestableView(); SillyString input = new SillyString("<a href='ken'>egozi</a>"); string expected = "<a href='ken'>egozi</a>"; string actual = GetFrom(view, delegate { view.Output(input); }); Assert.AreEqual(expected, actual); }
public void OutputEncoded_NullObject_OutputsEmpty() { var view = new TestableView(); object input = null; var expected = string.Empty; var actual = GetFrom(view, delegate { view.OutputEncoded(input); }); Assert.AreEqual(expected, actual); }
public void OutputEncoded_String_OutputsTheStringEncoded() { var view = new TestableView(); var input = "<a href='ken'>egozi</a>"; var expected = HttpUtility.HtmlEncode(input).Replace("'", "'"); var actual = GetFrom(view, delegate { view.OutputEncoded(input); }); Assert.AreEqual(expected, actual); }
public void Output_NullString_OutputsEmpty() { var view = new TestableView(); string input = null; var expected = string.Empty; var actual = GetFrom(view, delegate { view.Output(input); }); Assert.AreEqual(expected, actual); }
public void Output_NullObject_OutputsEmpty() { var view = new TestableView(); object input = null; var expected = string.Empty; var actual = GetFrom(view, delegate { view.Output(input); }); Assert.AreEqual(expected, actual); }
public void Output_String_OutputsTheString() { var view = new TestableView(); var input = "<a href='ken'>egozi</a>"; var expected = "<a href='ken'>egozi</a>"; var actual = GetFrom(view, delegate { view.Output(input); }); Assert.AreEqual(expected, actual); }
public void Output_String_OutputsTheString() { TestableView view = new TestableView(); string input = "<a href='ken'>egozi</a>"; string expected = "<a href='ken'>egozi</a>"; string actual = GetFrom(view, delegate { view.Output(input); }); Assert.AreEqual(expected, actual); }
public void OutputEncoded_Object_OutputsToStringEncoded() { TestableView view = new TestableView(); SillyString input = new SillyString("<a href='ken'>egozi</a>"); string expected = "<a href='ken'>egozi</a>"; string actual = GetFrom(view, delegate { view.OutputEncoded(input); }); Assert.AreEqual(expected, actual); }
public void OutputEncoded_Object_OutputsToStringEncoded() { var view = new TestableView(); var input = "<a href='ken'>egozi</a>"; var inputAsObject = new SillyString(input); var expected = HttpUtility.HtmlEncode(input).Replace("'", "'"); var actual = GetFrom(view, delegate { view.OutputEncoded(inputAsObject); }); Assert.AreEqual(expected, actual); }
public void OutputEncoded_String_OutputsTheStringEncoded() { TestableView view = new TestableView(); string input = "<a href='ken'>egozi</a>"; string expected = HttpUtility.HtmlEncode(input).Replace("'", "'"); string actual = GetFrom(view, delegate { view.OutputEncoded(input); }); Assert.AreEqual(expected, actual); }