本文整理汇总了C#中ResultSet.ShouldNotBeNull方法的典型用法代码示例。如果您正苦于以下问题:C# ResultSet.ShouldNotBeNull方法的具体用法?C# ResultSet.ShouldNotBeNull怎么用?C# ResultSet.ShouldNotBeNull使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ResultSet
的用法示例。
在下文中一共展示了ResultSet.ShouldNotBeNull方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Yahoo_PlaceFinder_ResultSet_ShouldOverrideToString
public void Yahoo_PlaceFinder_ResultSet_ShouldOverrideToString()
{
var it = new ResultSet
{
Locale = "locale",
ErrorMessage = "error message",
ResultsList = new List<Result>
{
new Result(), new Result(), new Result()
},
Found = 10,
};
it.ShouldNotBeNull();
it.ToString().ShouldEqual("locale, error message: 3 of 10");
}
示例2: Yahoo_PlaceFinder_ResultSet_ShouldSetAlternateNamesReadOnlyCollection
public void Yahoo_PlaceFinder_ResultSet_ShouldSetAlternateNamesReadOnlyCollection()
{
var it = new ResultSet
{
ResultsList = new List<Result>
{
new Result { Name = "name 1" },
new Result { Name = "name 2" },
new Result { Name = "name 3" },
}
};
it.ShouldNotBeNull();
it.ResultsList.ShouldNotBeNull();
it.ResultsList.Count.ShouldEqual(3);
it.Results.ShouldNotBeNull();
it.Results.Count.ShouldEqual(it.ResultsList.Count);
for (var i = 0; i < it.Results.Count; i++)
it.Results[i].Name.ShouldEqual(it.ResultsList[i].Name);
}
示例3: Yahoo_PlaceFinder_ResultSet_ShouldBePublic
public void Yahoo_PlaceFinder_ResultSet_ShouldBePublic()
{
var model = new ResultSet();
model.ShouldNotBeNull();
}