コード例 #1
0
        public async Task ValidateType()
        {
            var msnSearchService = new MSNSearch();
            var term             = "java";

            var result = await msnSearchService.GetResultsAsync(term);

            Assert.AreEqual(result.GetType(), typeof(long));
        }
コード例 #2
0
        public async Task ValidateEmpty()
        {
            var msnSearchService = new MSNSearch();
            var term             = "";

            var result = await msnSearchService.GetResultsAsync(term);

            // Empty term should give -1 as result
            Assert.AreEqual(result, -1);
        }