Exemplo n.º 1
0
        public void Should_Follow_And_Unfollow_User()
        {
            var api = new UserApi(GitHubUrl).WithAuthentication(ObjectFactory.GetInstance<IAuthenticator>());
            var user = api.GetUser("sgrassie");

            api.Follow("mono").Should().BeTrue("should follow the user mono");
            api.GetFollowing(user).Should().Contain(x => x.Login == "mono");

            api.UnFollow("mono").Should().BeTrue("Should unfollow the user mono");
            api.GetFollowing(user).Should().NotContain(x => x.Login == "mono");
        }
Exemplo n.º 2
0
        public void Should_Get_List_Of_Following()
        {
            var api = new UserApi(GitHubUrl);
            var user = api.GetUser("sgrassie");

            api.GetFollowing(user).Count.Should().BeGreaterThan(0);
        }