コード例 #1
0
        public void CheckFakeAdapterGitHubRepo()
        {
            var adapter = new FakeApiAdapter();

            var gitHubRepo = adapter.GetGitHubApiData <List <GitHubRepo> >(string.Format("abc"));

            Assert.IsNotNull(gitHubRepo);
            Assert.IsTrue(gitHubRepo.Count > 0, "gitHubRepo should have more than zero repos");
        }
コード例 #2
0
        public void CheckFakeAdapterGitHubUser()
        {
            var adapter = new FakeApiAdapter();

            var gitHubUser = adapter.GetGitHubApiData <GitHubUser>(string.Format("abc"));

            Assert.AreEqual(gitHubUser.UserName, "ABC");
            Assert.AreEqual(gitHubUser.Location, "england");
            Assert.AreEqual(gitHubUser.AvatarUrl, "http://www.example.com");
        }