public void DetailsView_ViewState () { PokerDetailsView dv = new PokerDetailsView (); PokerDetailsView copy = new PokerDetailsView (); dv.HeaderText = "Header"; dv.GridLines = GridLines.Vertical; dv.CssClass = "style.css"; object state = dv.SaveState (); copy.LoadState (state); Assert.AreEqual ("Header", copy.HeaderText, "ViewStateHeaderText"); Assert.AreEqual (GridLines.Vertical, copy.GridLines, "ViewStateGridLines"); Assert.AreEqual ("style.css", copy.CssClass, "ViewStateCssClass"); }