///<summary> /// This function defines what a "stable" state is -- meaning that if the pnlCollapsible is /// stable, then there should not be any chance of a runtime error (except for the case of the usercontrolnamespace /// string being wrong. That cannot be be checked correctly before runtime). ///</summary> void assertIsStable3(TPnlCollapsible APnl) { APnl.AssertDirStyleMatch(); APnl.AssertHckDataMatch(); Assert.AreNotEqual(null, APnl.TaskListNode); //required because expand() may be called at any moment, and it will throw an error if TaskListNode is null. So we require it's existance at all times. }
public void TestDirStyleMismatch() { FPnl = new TPnlCollapsible(THostedControlKind.hckUserControl, HOSTEDUSERCONTROL); try { FPnl.AssertDirStyleMatch(TCollapseDirection.cdHorizontal, TVisualStylesEnum.vsTaskPanel); } catch (Exception e) { Assert.AreEqual(typeof(EVisualStyleAndDirectionMismatchException), e.GetType()); } }