本文整理汇总了C#中AnItem.SetDetailAccessor方法的典型用法代码示例。如果您正苦于以下问题:C# AnItem.SetDetailAccessor方法的具体用法?C# AnItem.SetDetailAccessor怎么用?C# AnItem.SetDetailAccessor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AnItem
的用法示例。
在下文中一共展示了AnItem.SetDetailAccessor方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetDetail_ToString_WithSameValueAsDefault_DoesntAddDetail
public void SetDetail_ToString_WithSameValueAsDefault_DoesntAddDetail()
{
AnItem item = new AnItem();
item.SetDetailAccessor("ADetail", "howdy", "howdy");
Assert.That(item.Details.ContainsKey("ADetail"), Is.False);
}
示例2: SetDetail_WithBoolean_AddsDetail
public void SetDetail_WithBoolean_AddsDetail()
{
AnItem item = new AnItem();
item.SetDetailAccessor("ADetail", false);
Assert.That(item.Details["ADetail"], Is.Not.Null);
}
示例3: SetDetail_ToString_WithDefault_AddsDetail
public void SetDetail_ToString_WithDefault_AddsDetail()
{
AnItem item = new AnItem();
item.SetDetailAccessor("ADetail", "hello", "howdy");
Assert.That(item.Details["ADetail"], Is.Not.Null);
}
示例4: SetDetail_ToString_WithDefault_AddsStringDetail_WithSameValue
public void SetDetail_ToString_WithDefault_AddsStringDetail_WithSameValue()
{
AnItem item = new AnItem();
item.SetDetailAccessor("ADetail", "hello", "howdy");
Assert.That(item.Details["ADetail"].Value, Is.EqualTo("hello"));
}
示例5: SetDetail_ToString_AddsStringDetail
public void SetDetail_ToString_AddsStringDetail()
{
AnItem item = new AnItem();
item.SetDetailAccessor("ADetail", "hello");
Assert.That(item.Details["ADetail"].ValueType, Is.EqualTo(typeof(string)));
Assert.That(item.Details["ADetail"].ValueTypeKey, Is.EqualTo(ContentDetail.TypeKeys.StringType));
}
示例6: SetDetail_ToBoolean_WithSameValueAsDefault_DoesntAddDetail_True
public void SetDetail_ToBoolean_WithSameValueAsDefault_DoesntAddDetail_True()
{
AnItem item = new AnItem();
item.SetDetailAccessor("ADetail", true, true);
Assert.That(item.Details.ContainsKey("ADetail"), Is.False);
}
示例7: SetDetail_ToBoolean_AddsBooleanDetail
public void SetDetail_ToBoolean_AddsBooleanDetail()
{
AnItem item = new AnItem();
item.SetDetailAccessor("ADetail", false);
Assert.That(item.Details["ADetail"].ValueType, Is.EqualTo(typeof(bool)));
Assert.That(item.Details["ADetail"].ValueTypeKey, Is.EqualTo(ContentDetail.TypeKeys.BoolType));
}
示例8: SetDetail_ToString_AddsStringDetail
public void SetDetail_ToString_AddsStringDetail()
{
AnItem item = new AnItem();
item.SetDetailAccessor("ADetail", "hello");
Assert.That(item.Details["ADetail"], Is.TypeOf<StringDetail>());
}
示例9: SetDetail_ToBoolean_AddsBooleanDetail
public void SetDetail_ToBoolean_AddsBooleanDetail()
{
AnItem item = new AnItem();
item.SetDetailAccessor("ADetail", false);
Assert.That(item.Details["ADetail"], Is.TypeOf<BooleanDetail>());
}