本文整理汇总了C#中Poker类的典型用法代码示例。如果您正苦于以下问题:C# Poker类的具体用法?C# Poker怎么用?C# Poker使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Poker类属于命名空间,在下文中一共展示了Poker类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: SerializeObject
public void SerializeObject ()
{
Poker p = new Poker ();
string s = p.Serialize ("hi");
Assert.IsNull (s, "A1");
}
开发者ID:alesliehughes,项目名称:olive,代码行数:7,代码来源:JavaScriptConverterTest.cs
示例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");
}
开发者ID:alesliehughes,项目名称:olive,代码行数:7,代码来源:DateTimeConverterTest.cs
示例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");
}
开发者ID:nlhepler,项目名称:mono,代码行数:35,代码来源:KeyValueConfigurationElementTest.cs
示例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 (), "#");
}
开发者ID:nickchal,项目名称:pash,代码行数:8,代码来源:BehaviorsSectionTest.cs
示例5: SupportedTypes
public void SupportedTypes ()
{
Poker p = new Poker ();
Type[] ts = p.GetSupportedTypes();
Assert.IsNull (ts, "A1");
}
开发者ID:alesliehughes,项目名称:olive,代码行数:8,代码来源:JavaScriptConverterTest.cs
示例6: Add
public void Add ()
{
Poker p = new Poker();
Assert.AreEqual (0, p.Count, "A1");
p.Add (new PokerElement ("hi"));
}
开发者ID:nlhepler,项目名称:mono,代码行数:8,代码来源:ConfigurationElementCollectionTest.cs
示例7: ControlsAccessorTest
public void ControlsAccessorTest ()
{
Poker p = new Poker();
ControlCollection col = p.Controls;
Assert.AreEqual (col.Count, 1, "Controls accessor causes child control creation.");
}
开发者ID:nobled,项目名称:mono,代码行数:8,代码来源:CompositeControlTest.cs
示例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");
}
开发者ID:alesliehughes,项目名称:olive,代码行数:9,代码来源:DateTimeConverterTest.cs
示例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");
}
开发者ID:Profit0004,项目名称:mono,代码行数:12,代码来源:WebClientProtocolTest.cs
示例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");
}
开发者ID:Profit0004,项目名称:mono,代码行数:14,代码来源:XmlTest.cs
示例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");
}
开发者ID:nobled,项目名称:mono,代码行数:46,代码来源:WebPartTest.cs
示例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");
}
开发者ID:JokerMisfits,项目名称:linux-packaging-mono,代码行数:8,代码来源:FormViewTest.cs
示例13: FormView_EnsureDataBound
public void FormView_EnsureDataBound ()
{
Poker fv = new Poker ();
fv.DataSource = myds;
fv.DoOnPreRender (EventArgs.Empty);
Assert.AreEqual (true, fv.ensureDataBound, "EnsureDataBound");
}
开发者ID:JokerMisfits,项目名称:linux-packaging-mono,代码行数:8,代码来源:FormViewTest.cs
示例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");
}
开发者ID:JokerMisfits,项目名称:linux-packaging-mono,代码行数:14,代码来源:FormViewTest.cs
示例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");
}
开发者ID:JokerMisfits,项目名称:linux-packaging-mono,代码行数:21,代码来源:FormViewTest.cs
示例16: FormView_UpdateItem
public void FormView_UpdateItem ()
{
Poker fv = new Poker ();
fv.Page = new Page ();
fv.DataSource = myds;
fv.DataBind ();
fv.ChangeMode (FormViewMode.Edit);
fv.ItemUpdating += new FormViewUpdateEventHandler (update_item);
Assert.AreEqual (false, updateItem, "BeforeUpdateItem");
fv.UpdateItem (false);
Assert.AreEqual (true, updateItem, "AfterUpdateItem");
}
开发者ID:JokerMisfits,项目名称:linux-packaging-mono,代码行数:13,代码来源:FormViewTest.cs
示例17: FormView_DeleteItem
public void FormView_DeleteItem ()
{
Poker fv = new Poker ();
fv.Page = new Page ();
fv.DataSource = myds;
fv.DataBind ();
Assert.AreEqual (false, isDeleted, "BeforeDeleteItem");
fv.ItemDeleting += new FormViewDeleteEventHandler (fv_DeleteingHandler);
fv.DeleteItem ();
Assert.AreEqual (true, isDeleted, "BeforeDeleteItem");
}
开发者ID:JokerMisfits,项目名称:linux-packaging-mono,代码行数:12,代码来源:FormViewTest.cs
示例18: FormView_DataKey
public void FormView_DataKey ()
{
Page p = new Page ();
Poker fv = new Poker ();
p.Controls.Add (fv);
ObjectDataSource data = new ObjectDataSource ();
data.TypeName = typeof (FormViewDataObject).AssemblyQualifiedName;
data.SelectMethod = "Select";
p.Controls.Add (data);
fv.DataSource = data;
fv.DataKeyNames = new string [] { "ID", "FName" };
DataKey key1 = fv.DataKey;
Assert.AreEqual (null, key1.Value, "DataKey.Value before binding");
Assert.AreEqual (0, key1.Values.Count, "DataKey.Values count before binding");
fv.DataBind ();
DataKey key2 = fv.DataKey;
DataKey key3 = fv.DataKey;
Assert.IsFalse (Object.ReferenceEquals (key1, key2), "DataKey returns the same instans");
Assert.IsTrue (Object.ReferenceEquals (key2, key3), "DataKey returns the same instans");
Assert.AreEqual (1001, key1.Value, "DataKey.Value after binding");
Assert.AreEqual (2, key1.Values.Count, "DataKey.Values count after binding");
Assert.AreEqual (1001, key1.Values [0], "DataKey.Values[0] after binding");
Assert.AreEqual ("Mahesh", key1.Values [1], "DataKey.Values[1] after binding");
Poker copy = new Poker ();
object state = fv.DoSaveControlState ();
copy.DoLoadControlState (state);
DataKey key4 = copy.DataKey;
Assert.AreEqual (1001, key4.Value, "DataKey.Value from ViewState");
Assert.AreEqual (2, key4.Values.Count, "DataKey.Values count from ViewState");
Assert.AreEqual (1001, key4.Values [0], "DataKey.Values[0] from ViewState");
Assert.AreEqual ("Mahesh", key4.Values [1], "DataKey.Values[1] from ViewState");
}
开发者ID:JokerMisfits,项目名称:linux-packaging-mono,代码行数:44,代码来源:FormViewTest.cs
示例19: FormView_ChangeMode
public void FormView_ChangeMode ()
{
Poker fv = new Poker ();
Assert.AreEqual (FormViewMode.ReadOnly, fv.CurrentMode, "ChangeModeDefault");
fv.ChangeMode (FormViewMode.Insert);
Assert.AreEqual (FormViewMode.Insert, fv.CurrentMode, "ChangeModeInsert");
fv.ChangeMode (FormViewMode.Edit);
Assert.AreEqual (FormViewMode.Edit, fv.CurrentMode, "ChangeModeEdit");
fv.ChangeMode (FormViewMode.ReadOnly);
Assert.AreEqual (FormViewMode.ReadOnly, fv.CurrentMode, "ChangeModeReadOnly");
}
开发者ID:JokerMisfits,项目名称:linux-packaging-mono,代码行数:11,代码来源:FormViewTest.cs
示例20: FormView_ExtractRowValues
public void FormView_ExtractRowValues ()
{
Poker fv=new Poker ();
fv.ItemTemplate = new MyTemplate ();
fv.DataKeyNames = new string[] { "ID", "FName", "LName" };
//IOrderedDictionary dict = (IOrderedDictionary) new OrderedDictionary (0x19);
//fv.DoExtractRowValues (dict, true);
//DataTable ds = CreateDataTable ();
//fv.DataSource = ds;
//fv.DataBind ();
//OrderedDictionary fieldsValues = new OrderedDictionary ();
//fv.DoExtractRowValues (fieldsValues, true);
//Assert.AreEqual (3, fieldsValues.Count, "ExtractRowValues1");
//Assert.AreEqual (3, fieldsValues.Keys.Count, "ExtractRowValues2");
//Assert.AreEqual (3, fieldsValues.Values.Count, "ExtractRowValues3");
//Assert.AreEqual (true, fieldsValues.Contains ("ID"), "ExtractRowValues4");
//IDictionaryEnumerator enumerator = fieldsValues.GetEnumerator ();
//enumerator.MoveNext ();
//Assert.AreEqual ("ID", enumerator.Key, "FieldValue1");
//Assert.AreEqual ("1001", enumerator.Value, "FieldValue2");
//enumerator.MoveNext ();
//Assert.AreEqual ("FName", enumerator.Key, "FieldValue3");
//Assert.AreEqual ("Mahesh", enumerator.Value, "FieldValue4");
//enumerator.MoveNext ();
//Assert.AreEqual ("LName", enumerator.Key, "FieldValue5");
//Assert.AreEqual ("Chand", enumerator.Value, "FieldValue6");
}
开发者ID:JokerMisfits,项目名称:linux-packaging-mono,代码行数:28,代码来源:FormViewTest.cs
注:本文中的Poker类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论