コード例 #1
0
        public async Task RequestsCorrectUrl()
        {
            var connection = Substitute.For <IApiConnection>();
            var client     = new RepositoryInvitationsClient(connection);

            await client.Decline(1);

            connection.Connection.Received().Delete(Arg.Is <Uri>(u => u.ToString() == "user/repository_invitations/1"), Arg.Any <object>(), "application/vnd.github.swamp-thing-preview+json");
        }
コード例 #2
0
        public async Task RequestsCorrectUrl()
        {
            var connection = Substitute.For <IApiConnection>();
            var client     = new RepositoryInvitationsClient(connection);

            await client.Decline(1);

            connection.Connection.Received().Delete(Arg.Is <Uri>(u => u.ToString() == "user/repository_invitations/1"));
        }