public void HotSpot_AssignToDefaultProperties() { PokerHotSpot hotSpot = new PokerHotSpot(); Assert.AreEqual(0, hotSpot.StateBag.Count, "ViewState.Count"); hotSpot.AccessKey = string.Empty; Assert.AreEqual(string.Empty, hotSpot.AccessKey, "AccessKey"); Assert.AreEqual(1, hotSpot.StateBag.Count, "ViewState.Count-1"); hotSpot.AlternateText = string.Empty; Assert.AreEqual(string.Empty, hotSpot.AlternateText, "AlternateText"); Assert.AreEqual(2, hotSpot.StateBag.Count, "ViewState.Count-2"); hotSpot.HotSpotMode = HotSpotMode.NotSet; Assert.AreEqual(HotSpotMode.NotSet, hotSpot.HotSpotMode, "HotSpotMode"); Assert.AreEqual(3, hotSpot.StateBag.Count, "ViewState.Count-3"); hotSpot.NavigateUrl = string.Empty; Assert.AreEqual(string.Empty, hotSpot.NavigateUrl, "NavigateUrl"); Assert.AreEqual(4, hotSpot.StateBag.Count, "ViewState.Count-4"); hotSpot.PostBackValue = string.Empty; Assert.AreEqual(string.Empty, hotSpot.PostBackValue, "PostBackValue"); Assert.AreEqual(5, hotSpot.StateBag.Count, "ViewState.Count-5"); hotSpot.TabIndex = 0; Assert.AreEqual(0, hotSpot.TabIndex, "TabIndex"); Assert.AreEqual(6, hotSpot.StateBag.Count, "ViewState.Count-6"); hotSpot.Target = string.Empty; Assert.AreEqual(string.Empty, hotSpot.Target, "Target"); Assert.AreEqual(7, hotSpot.StateBag.Count, "ViewState.Count-7"); }
public void HotSpot_ExpHotSpotMode() { // The specified type is not one of the HotSpotMode enumeration values. PokerHotSpot hotSpot = new PokerHotSpot(); hotSpot.HotSpotMode = (HotSpotMode)10; }
public void HotSpot_ViewState() { PokerHotSpot hotSpot = new PokerHotSpot(); hotSpot.AccessKey = string.Empty; Assert.AreEqual(string.Empty, hotSpot.AccessKey, "AccessKey-beforecopy"); hotSpot.AlternateText = string.Empty; Assert.AreEqual(string.Empty, hotSpot.AlternateText, "AlternateText-beforecopy"); hotSpot.HotSpotMode = HotSpotMode.NotSet; Assert.AreEqual(HotSpotMode.NotSet, hotSpot.HotSpotMode, "HotSpotMode-beforecopy"); hotSpot.NavigateUrl = string.Empty; Assert.AreEqual(string.Empty, hotSpot.NavigateUrl, "NavigateUrl-beforecopy"); hotSpot.PostBackValue = string.Empty; Assert.AreEqual(string.Empty, hotSpot.PostBackValue, "PostBackValue-beforecopy"); hotSpot.TabIndex = 0; Assert.AreEqual(0, hotSpot.TabIndex, "TabIndex-beforecopy"); hotSpot.Target = string.Empty; Assert.AreEqual(string.Empty, hotSpot.Target, "Target-beforecopy"); Assert.AreEqual(true, hotSpot.IsTrackingState, "IsTrackingState-beforecopy"); object state = hotSpot.SaveState(); PokerHotSpot copy = new PokerHotSpot(); copy.LoadState(state); Assert.AreEqual(string.Empty, hotSpot.AccessKey, "AccessKey-aftercopy"); Assert.AreEqual(string.Empty, hotSpot.AlternateText, "AlternateText-aftercopy"); Assert.AreEqual(HotSpotMode.NotSet, hotSpot.HotSpotMode, "HotSpotMode-aftercopy"); Assert.AreEqual(string.Empty, hotSpot.NavigateUrl, "NavigateUrl-aftercopy"); Assert.AreEqual(string.Empty, hotSpot.PostBackValue, "PostBackValue-aftercopy"); Assert.AreEqual(0, hotSpot.TabIndex, "TabIndex-aftercopy"); Assert.AreEqual(string.Empty, hotSpot.Target, "Target-aftercopy"); Assert.AreEqual(true, hotSpot.IsTrackingState, "IsTrackingState-aftercopy"); }
public void HotSpot_ExpAccessKey() { // The specified access key is neither a a null reference, // an empty string (""), nor a single character string. PokerHotSpot hotSpot = new PokerHotSpot(); hotSpot.AccessKey = "abc"; }
public void HotSpot_DefaultProperties() { PokerHotSpot hotSpot = new PokerHotSpot(); Assert.AreEqual(0, hotSpot.StateBag.Count, "ViewState.Count"); // Public Properties Assert.AreEqual(string.Empty, hotSpot.AccessKey, "AccessKey"); Assert.AreEqual(string.Empty, hotSpot.AlternateText, "AlternateText"); Assert.AreEqual(HotSpotMode.NotSet, hotSpot.HotSpotMode, "HotSpotMode"); Assert.AreEqual(string.Empty, hotSpot.NavigateUrl, "NavigateUrl"); Assert.AreEqual(string.Empty, hotSpot.PostBackValue, "PostBackValue"); Assert.AreEqual(0, hotSpot.TabIndex, "TabIndex"); Assert.AreEqual(string.Empty, hotSpot.Target, "Target"); // Protected Properties Assert.AreEqual(true, hotSpot.IsTrackingState, "IsTrackingState"); }