本文整理汇总了C#中Poker类的典型用法代码示例。如果您正苦于以下问题:C# Poker类的具体用法?C# Poker怎么用?C# Poker使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Poker类属于命名空间,在下文中一共展示了Poker类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SerializeObject
public void SerializeObject ()
{
Poker p = new Poker ();
string s = p.Serialize ("hi");
Assert.IsNull (s, "A1");
}
示例2: SerializeObject
public void SerializeObject ()
{
Poker p = new Poker ();
DateTime dt = new DateTime (2005, 9, 25, 22, 30, 45);
string s = p.Serialize (dt);
Assert.AreEqual ("new Date(2005,8,25,22,30,45)", s, "A1");
}
示例3: Properties
public void Properties ()
{
Poker p = new Poker ("name", "value");
ConfigurationPropertyCollection props = p.GetProperties();
Assert.IsNotNull (props, "A1");
Assert.AreEqual (2, props.Count, "A2");
ConfigurationProperty prop;
prop = props["key"];
Assert.AreEqual ("key", prop.Name, "A3");
Assert.IsNull (prop.Description, "A4");
Assert.AreEqual (typeof (string), prop.Type, "A5");
Assert.AreEqual (typeof (StringConverter), prop.Converter.GetType(), "A6");
Assert.IsNotNull (prop.Validator, "Anull");
Assert.AreEqual (typeof (DefaultValidator), prop.Validator.GetType(), "A7");
Assert.AreEqual ("", prop.DefaultValue, "A8");
Assert.IsTrue (prop.IsKey, "A9");
Assert.IsTrue (prop.IsRequired, "A10");
Assert.IsFalse (prop.IsDefaultCollection, "A11");
prop = props["value"];
Assert.AreEqual ("value", prop.Name, "A12");
Assert.IsNull (prop.Description, "A13");
Assert.AreEqual (typeof (string), prop.Type, "A14");
Assert.AreEqual (typeof (StringConverter), prop.Converter.GetType(), "A15");
Assert.AreEqual (typeof (DefaultValidator), prop.Validator.GetType(), "A16");
Assert.AreEqual ("", prop.DefaultValue, "A17");
Assert.IsFalse (prop.IsKey, "A18");
Assert.IsFalse (prop.IsRequired, "A19");
Assert.IsFalse (prop.IsDefaultCollection, "A20");
}
示例4: Properties
public void Properties () {
Poker p1 = new Poker ();
Poker p2 = new Poker ();
Assert.AreEqual (false, p1.GetProperties ().Contains ("myProperty"), "Contains myProperty");
Assert.AreEqual (false, p1.GetProperties () == p2.GetProperties (), "#");
}
示例5: SupportedTypes
public void SupportedTypes ()
{
Poker p = new Poker ();
Type[] ts = p.GetSupportedTypes();
Assert.IsNull (ts, "A1");
}
示例6: Add
public void Add ()
{
Poker p = new Poker();
Assert.AreEqual (0, p.Count, "A1");
p.Add (new PokerElement ("hi"));
}
示例7: ControlsAccessorTest
public void ControlsAccessorTest ()
{
Poker p = new Poker();
ControlCollection col = p.Controls;
Assert.AreEqual (col.Count, 1, "Controls accessor causes child control creation.");
}
示例8: SupportedTypes
public void SupportedTypes ()
{
Poker p = new Poker ();
Type[] ts = p.GetSupportedTypes();
Assert.AreEqual (1, ts.Length, "A1");
Assert.AreEqual (typeof (DateTime), ts[0], "A2");
}
示例9: TestUseDefaultCredentials
public void TestUseDefaultCredentials () {
Poker client = new Poker ();
Assert.IsFalse (client.UseDefaultCredentials, "#1");
client.UseDefaultCredentials = true;
Assert.IsTrue (client.Credentials == CredentialCache.DefaultCredentials, "#2");
client.Credentials = new NetworkCredential ("a", "b");
Assert.IsFalse (client.UseDefaultCredentials, "#3");
client.UseDefaultCredentials = false;
Assert.IsNull (client.Credentials, "#4");
client.Credentials = CredentialCache.DefaultCredentials;
Assert.IsTrue (client.UseDefaultCredentials, "#5");
}
示例10: Label_ViewState
public void Label_ViewState ()
{
XmlPoker p = new XmlPoker ();
Assert.AreEqual (p.Text, "", "A1");
p.Text = "Hello";
Assert.AreEqual (p.Text, "Hello", "A2");
object state = p.SaveState ();
Poker copy = new Poker ();
copy.LoadState (state);
Assert.AreEqual (copy.Text, "Hello", "A3");
}
示例11: Defaults
public void Defaults ()
{
Poker p = new Poker ();
Assert.AreEqual (p.AllowClose, true, "A1");
Assert.AreEqual (p.AllowConnect, true, "A2");
Assert.AreEqual (p.AllowEdit, true, "A3");
Assert.AreEqual (p.AllowHide, true, "A4");
Assert.AreEqual (p.AllowMinimize, true, "A5");
Assert.AreEqual (p.AllowZoneChange, true, "A6");
Assert.AreEqual (p.AuthorizationFilter, String.Empty, "A7");
Assert.AreEqual (p.CatalogIconImageUrl, String.Empty, "A8");
Assert.AreEqual (p.ChromeState, PartChromeState.Normal, "A9");
Assert.AreEqual (p.ChromeType, PartChromeType.Default, "A10");
Assert.AreEqual (p.ConnectErrorMessage, String.Empty, "A11");
Assert.AreEqual (p.Description, String.Empty, "A12");
/* Direction - A13 */
Assert.AreEqual (p.DisplayTitle, "Untitled", "A14");
Assert.AreEqual (p.ExportMode, WebPartExportMode.None, "A15");
Assert.AreEqual (p.HasSharedData, false, "A16");
Assert.AreEqual (p.HasUserData, false, "A17");
Assert.AreEqual (p.Height, Unit.Empty, "A18");
Assert.AreEqual (p.HelpMode, WebPartHelpMode.Navigate, "A19");
Assert.AreEqual (p.HelpUrl, String.Empty, "A20");
Assert.AreEqual (p.Hidden, false, "A21");
Assert.AreEqual (p.ImportErrorMessage, "Cannot import this Web Part.", "A22");
Assert.AreEqual (p.IsClosed, false, "A23");
Assert.AreEqual (p.IsShared, false, "A24");
Assert.AreEqual (p.IsStandalone, true, "A25");
/* this next isn't really a default - it's true
* because the part was created programmatically */
Assert.AreEqual (p.IsStatic, true, "A26");
Assert.AreEqual (p.Subtitle, String.Empty, "A27");
Assert.AreEqual (p.Title, String.Empty, "A28");
Assert.AreEqual (p.TitleIconImageUrl, String.Empty, "A29");
Assert.AreEqual (p.TitleUrl, String.Empty, "A30");
Assert.IsNotNull (p.Verbs, "A31");
#if IWebEditableInterface
Assert.AreEqual (p.WebBrowsableObject, null, "A32");
#endif
#if notyet
Assert.AreEqual (p.WebPartManager, null, "A33");
#endif
Assert.AreEqual (p.Width, Unit.Empty, "A34");
Assert.AreEqual (p.ZoneIndex, 0, "A35");
}
示例12: FormView_PerformDataBinding
public void FormView_PerformDataBinding ()
{
Poker fv = new Poker ();
fv.Page = new Page ();
Assert.AreEqual (0,fv.DataItemCount, "BeforePerformDataBinding");
fv.DoPerformDataBinding (myds);
Assert.AreEqual (6, fv.DataItemCount, "AfterPerformDataBinding");
}
示例13: FormView_EnsureDataBound
public void FormView_EnsureDataBound ()
{
Poker fv = new Poker ();
fv.DataSource = myds;
fv.DoOnPreRender (EventArgs.Empty);
Assert.AreEqual (true, fv.ensureDataBound, "EnsureDataBound");
}
示例14: FormView_CreateTable
public void FormView_CreateTable ()
{
Poker fv = new Poker ();
Table tb = fv.DoCreateTable ();
fv.Page = new Page ();
Assert.AreEqual ("", tb.BackImageUrl , "CreateTable1");
Assert.AreEqual (0, tb.Rows.Count, "CreateTable2");
fv.DataSource = myds;
fv.DataBind ();
fv.ID = "TestFormView";
tb = fv.DoCreateTable ();
Assert.AreEqual (-1, tb.CellPadding , "CreateTable3");
}
示例15: FormView_CreateRow
public void FormView_CreateRow ()
{
Poker fv = new Poker ();
fv.AllowPaging =true;
fv.DataSource = myds;
fv.Page = new Page ();
fv.DataBind ();
FormViewRow row = fv.DoCreateRow (2,DataControlRowType.DataRow ,DataControlRowState.Normal );
Assert.AreEqual (2, row.ItemIndex, "CreatedRowItemIndex1");
Assert.AreEqual (DataControlRowState.Normal , row.RowState, "CreatedRowState1");
Assert.AreEqual (DataControlRowType.DataRow , row.RowType, "CreatedRowType1");
row = fv.DoCreateRow (4, DataControlRowType.Footer, DataControlRowState.Edit);
Assert.AreEqual (4, row.ItemIndex, "CreatedRowItemIndex2");
Assert.AreEqual (DataControlRowState.Edit , row.RowState, "CreatedRowState2");
Assert.AreEqual (DataControlRowType.Footer , row.RowType, "CreatedRowType2");
//FormViewPagerRow pagerRow = (FormViewPagerRow)fv.DoCreateRow (3, DataControlRowType.Pager , DataControlRowState.Insert);
//Assert.AreEqual (3, pagerRow.ItemIndex, "CreatedPageRowItemIndex");
//Assert.AreEqual (DataControlRowState.Insert, pagerRow.RowState, "CreatedPageRowState");
//Assert.AreEqual (DataControlRowType.Pager, pagerRow.RowType, "CreatedPageRowType");
}