本文整理汇总了C#中PageModel.SearchLocation方法的典型用法代码示例。如果您正苦于以下问题:C# PageModel.SearchLocation方法的具体用法?C# PageModel.SearchLocation怎么用?C# PageModel.SearchLocation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PageModel
的用法示例。
在下文中一共展示了PageModel.SearchLocation方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TestSearchLocationTogglesSearchingStatus
public void TestSearchLocationTogglesSearchingStatus() {
Assert.ExpectAsserts(2);
MockFlickrService flickrService = new MockFlickrService();
PageModel pageModel = new PageModel(flickrService, null);
pageModel.SearchLocation("xyz", 0, 0);
Assert.IsTrue(pageModel.Searching, "Expected model to report true for Searching.");
Window.SetTimeout(delegate() {
PhotoResult[] dummyResults = new PhotoResult[0];
flickrService.InvokeCallback(dummyResults);
Assert.IsTrue(pageModel.Searching == false, "Expected model to report false for Searching.");
TestEngine.ResumeOnAsyncCompleted();
}, 2000);
TestEngine.WaitForAsyncCompletion();
}