public void Render_NoPage() { TestLoginName ln = new TestLoginName(); Assert.AreEqual(String.Empty, ln.Render(), "Render"); Assert.AreEqual(String.Empty, ln.RenderContents(), "RenderContents"); Assert.AreEqual(String.Empty, ln.RenderBeginTag(), "RenderBeginTag"); Assert.AreEqual(String.Empty, ln.RenderEndTag(false), "RenderEndTag"); }
public void Render_Anonymous_IPrincipal() { ContextPage page = new ContextPage(GetPrincipal(String.Empty)); TestLoginName ln = new TestLoginName(); ln.Page = page; Assert.AreEqual(String.Empty, ln.Render(), "Render"); Assert.AreEqual(String.Empty, ln.RenderContents(), "RenderContents"); Assert.AreEqual(String.Empty, ln.RenderBeginTag(), "RenderBeginTag"); Assert.AreEqual(String.Empty, ln.RenderEndTag(false), "RenderEndTag"); }
public void Render_UnauthenticatedUser() { ContextPage page = new ContextPage(GetUnauthenticatedPrincipal("me")); TestLoginName ln = new TestLoginName(); ln.Page = page; Assert.IsFalse(page.User.Identity.IsAuthenticated, "IsAuthenticated"); Assert.AreEqual("<span>me</span>", ln.Render(), "Render"); Assert.AreEqual("me", ln.RenderContents(), "RenderContents"); Assert.AreEqual("<span>", ln.RenderBeginTag(), "RenderBeginTag"); Assert.AreEqual("<span></span>", ln.RenderEndTag(true), "RenderEndTag"); }
public void Render_UnauthenticatedUser () { ContextPage page = new ContextPage (GetUnauthenticatedPrincipal ("me")); TestLoginName ln = new TestLoginName (); ln.Page = page; Assert.IsFalse (page.User.Identity.IsAuthenticated, "IsAuthenticated"); Assert.AreEqual ("<span>me</span>", ln.Render (), "Render"); Assert.AreEqual ("me", ln.RenderContents (), "RenderContents"); Assert.AreEqual ("<span>", ln.RenderBeginTag (), "RenderBeginTag"); Assert.AreEqual ("<span></span>", ln.RenderEndTag (true), "RenderEndTag"); }
public void Render_Anonymous_IPrincipal () { ContextPage page = new ContextPage (GetPrincipal (String.Empty)); TestLoginName ln = new TestLoginName (); ln.Page = page; Assert.AreEqual (String.Empty, ln.Render (), "Render"); Assert.AreEqual (String.Empty, ln.RenderContents (), "RenderContents"); Assert.AreEqual (String.Empty, ln.RenderBeginTag (), "RenderBeginTag"); Assert.AreEqual (String.Empty, ln.RenderEndTag (false), "RenderEndTag"); }
public void Render_NoPage () { TestLoginName ln = new TestLoginName (); Assert.AreEqual (String.Empty, ln.Render (), "Render"); Assert.AreEqual (String.Empty, ln.RenderContents (), "RenderContents"); Assert.AreEqual (String.Empty, ln.RenderBeginTag (), "RenderBeginTag"); Assert.AreEqual (String.Empty, ln.RenderEndTag (false), "RenderEndTag"); }