github.com/google/go-github/v42@v42.0.0/github/github-stringify_test.go (about) 1 // Copyright 2019 The go-github AUTHORS. All rights reserved. 2 // 3 // Use of this source code is governed by a BSD-style 4 // license that can be found in the LICENSE file. 5 6 // Code generated by gen-stringify-tests; DO NOT EDIT. 7 8 package github 9 10 import ( 11 "testing" 12 ) 13 14 func Float64(v float64) *float64 { return &v } 15 16 func TestActionsAllowed_String(t *testing.T) { 17 v := ActionsAllowed{ 18 GithubOwnedAllowed: Bool(false), 19 VerifiedAllowed: Bool(false), 20 } 21 want := `github.ActionsAllowed{GithubOwnedAllowed:false, VerifiedAllowed:false}` 22 if got := v.String(); got != want { 23 t.Errorf("ActionsAllowed.String = %v, want %v", got, want) 24 } 25 } 26 27 func TestActionsPermissions_String(t *testing.T) { 28 v := ActionsPermissions{ 29 EnabledRepositories: String(""), 30 AllowedActions: String(""), 31 SelectedActionsURL: String(""), 32 } 33 want := `github.ActionsPermissions{EnabledRepositories:"", AllowedActions:"", SelectedActionsURL:""}` 34 if got := v.String(); got != want { 35 t.Errorf("ActionsPermissions.String = %v, want %v", got, want) 36 } 37 } 38 39 func TestAdminStats_String(t *testing.T) { 40 v := AdminStats{ 41 Issues: &IssueStats{}, 42 Hooks: &HookStats{}, 43 Milestones: &MilestoneStats{}, 44 Orgs: &OrgStats{}, 45 Comments: &CommentStats{}, 46 Pages: &PageStats{}, 47 Users: &UserStats{}, 48 Gists: &GistStats{}, 49 Pulls: &PullStats{}, 50 Repos: &RepoStats{}, 51 } 52 want := `github.AdminStats{Issues:github.IssueStats{}, Hooks:github.HookStats{}, Milestones:github.MilestoneStats{}, Orgs:github.OrgStats{}, Comments:github.CommentStats{}, Pages:github.PageStats{}, Users:github.UserStats{}, Gists:github.GistStats{}, Pulls:github.PullStats{}, Repos:github.RepoStats{}}` 53 if got := v.String(); got != want { 54 t.Errorf("AdminStats.String = %v, want %v", got, want) 55 } 56 } 57 58 func TestAdvancedSecurity_String(t *testing.T) { 59 v := AdvancedSecurity{ 60 Status: String(""), 61 } 62 want := `github.AdvancedSecurity{Status:""}` 63 if got := v.String(); got != want { 64 t.Errorf("AdvancedSecurity.String = %v, want %v", got, want) 65 } 66 } 67 68 func TestAuthorization_String(t *testing.T) { 69 v := Authorization{ 70 ID: Int64(0), 71 URL: String(""), 72 Token: String(""), 73 TokenLastEight: String(""), 74 HashedToken: String(""), 75 App: &AuthorizationApp{}, 76 Note: String(""), 77 NoteURL: String(""), 78 UpdatedAt: &Timestamp{}, 79 CreatedAt: &Timestamp{}, 80 Fingerprint: String(""), 81 User: &User{}, 82 } 83 want := `github.Authorization{ID:0, URL:"", Token:"", TokenLastEight:"", HashedToken:"", App:github.AuthorizationApp{}, Note:"", NoteURL:"", UpdatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, Fingerprint:"", User:github.User{}}` 84 if got := v.String(); got != want { 85 t.Errorf("Authorization.String = %v, want %v", got, want) 86 } 87 } 88 89 func TestAuthorizationApp_String(t *testing.T) { 90 v := AuthorizationApp{ 91 URL: String(""), 92 Name: String(""), 93 ClientID: String(""), 94 } 95 want := `github.AuthorizationApp{URL:"", Name:"", ClientID:""}` 96 if got := v.String(); got != want { 97 t.Errorf("AuthorizationApp.String = %v, want %v", got, want) 98 } 99 } 100 101 func TestAuthorizationRequest_String(t *testing.T) { 102 v := AuthorizationRequest{ 103 Note: String(""), 104 NoteURL: String(""), 105 ClientID: String(""), 106 ClientSecret: String(""), 107 Fingerprint: String(""), 108 } 109 want := `github.AuthorizationRequest{Note:"", NoteURL:"", ClientID:"", ClientSecret:"", Fingerprint:""}` 110 if got := v.String(); got != want { 111 t.Errorf("AuthorizationRequest.String = %v, want %v", got, want) 112 } 113 } 114 115 func TestAuthorizationUpdateRequest_String(t *testing.T) { 116 v := AuthorizationUpdateRequest{ 117 Note: String(""), 118 NoteURL: String(""), 119 Fingerprint: String(""), 120 } 121 want := `github.AuthorizationUpdateRequest{Note:"", NoteURL:"", Fingerprint:""}` 122 if got := v.String(); got != want { 123 t.Errorf("AuthorizationUpdateRequest.String = %v, want %v", got, want) 124 } 125 } 126 127 func TestCheckRun_String(t *testing.T) { 128 v := CheckRun{ 129 ID: Int64(0), 130 NodeID: String(""), 131 HeadSHA: String(""), 132 ExternalID: String(""), 133 URL: String(""), 134 HTMLURL: String(""), 135 DetailsURL: String(""), 136 Status: String(""), 137 Conclusion: String(""), 138 StartedAt: &Timestamp{}, 139 CompletedAt: &Timestamp{}, 140 Output: &CheckRunOutput{}, 141 Name: String(""), 142 CheckSuite: &CheckSuite{}, 143 App: &App{}, 144 } 145 want := `github.CheckRun{ID:0, NodeID:"", HeadSHA:"", ExternalID:"", URL:"", HTMLURL:"", DetailsURL:"", Status:"", Conclusion:"", StartedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, CompletedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, Output:github.CheckRunOutput{}, Name:"", CheckSuite:github.CheckSuite{}, App:github.App{}}` 146 if got := v.String(); got != want { 147 t.Errorf("CheckRun.String = %v, want %v", got, want) 148 } 149 } 150 151 func TestCheckSuite_String(t *testing.T) { 152 v := CheckSuite{ 153 ID: Int64(0), 154 NodeID: String(""), 155 HeadBranch: String(""), 156 HeadSHA: String(""), 157 URL: String(""), 158 BeforeSHA: String(""), 159 AfterSHA: String(""), 160 Status: String(""), 161 Conclusion: String(""), 162 CreatedAt: &Timestamp{}, 163 UpdatedAt: &Timestamp{}, 164 App: &App{}, 165 Repository: &Repository{}, 166 HeadCommit: &Commit{}, 167 } 168 want := `github.CheckSuite{ID:0, NodeID:"", HeadBranch:"", HeadSHA:"", URL:"", BeforeSHA:"", AfterSHA:"", Status:"", Conclusion:"", CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, UpdatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, App:github.App{}, Repository:github.Repository{}, HeadCommit:github.Commit{}}` 169 if got := v.String(); got != want { 170 t.Errorf("CheckSuite.String = %v, want %v", got, want) 171 } 172 } 173 174 func TestCodeResult_String(t *testing.T) { 175 v := CodeResult{ 176 Name: String(""), 177 Path: String(""), 178 SHA: String(""), 179 HTMLURL: String(""), 180 Repository: &Repository{}, 181 } 182 want := `github.CodeResult{Name:"", Path:"", SHA:"", HTMLURL:"", Repository:github.Repository{}}` 183 if got := v.String(); got != want { 184 t.Errorf("CodeResult.String = %v, want %v", got, want) 185 } 186 } 187 188 func TestCombinedStatus_String(t *testing.T) { 189 v := CombinedStatus{ 190 State: String(""), 191 Name: String(""), 192 SHA: String(""), 193 TotalCount: Int(0), 194 CommitURL: String(""), 195 RepositoryURL: String(""), 196 } 197 want := `github.CombinedStatus{State:"", Name:"", SHA:"", TotalCount:0, CommitURL:"", RepositoryURL:""}` 198 if got := v.String(); got != want { 199 t.Errorf("CombinedStatus.String = %v, want %v", got, want) 200 } 201 } 202 203 func TestCommentStats_String(t *testing.T) { 204 v := CommentStats{ 205 TotalCommitComments: Int(0), 206 TotalGistComments: Int(0), 207 TotalIssueComments: Int(0), 208 TotalPullRequestComments: Int(0), 209 } 210 want := `github.CommentStats{TotalCommitComments:0, TotalGistComments:0, TotalIssueComments:0, TotalPullRequestComments:0}` 211 if got := v.String(); got != want { 212 t.Errorf("CommentStats.String = %v, want %v", got, want) 213 } 214 } 215 216 func TestCommit_String(t *testing.T) { 217 v := Commit{ 218 SHA: String(""), 219 Author: &CommitAuthor{}, 220 Committer: &CommitAuthor{}, 221 Message: String(""), 222 Tree: &Tree{}, 223 Stats: &CommitStats{}, 224 HTMLURL: String(""), 225 URL: String(""), 226 Verification: &SignatureVerification{}, 227 NodeID: String(""), 228 CommentCount: Int(0), 229 } 230 want := `github.Commit{SHA:"", Author:github.CommitAuthor{}, Committer:github.CommitAuthor{}, Message:"", Tree:github.Tree{}, Stats:github.CommitStats{}, HTMLURL:"", URL:"", Verification:github.SignatureVerification{}, NodeID:"", CommentCount:0}` 231 if got := v.String(); got != want { 232 t.Errorf("Commit.String = %v, want %v", got, want) 233 } 234 } 235 236 func TestCommitAuthor_String(t *testing.T) { 237 v := CommitAuthor{ 238 Name: String(""), 239 Email: String(""), 240 Login: String(""), 241 } 242 want := `github.CommitAuthor{Name:"", Email:"", Login:""}` 243 if got := v.String(); got != want { 244 t.Errorf("CommitAuthor.String = %v, want %v", got, want) 245 } 246 } 247 248 func TestCommitFile_String(t *testing.T) { 249 v := CommitFile{ 250 SHA: String(""), 251 Filename: String(""), 252 Additions: Int(0), 253 Deletions: Int(0), 254 Changes: Int(0), 255 Status: String(""), 256 Patch: String(""), 257 BlobURL: String(""), 258 RawURL: String(""), 259 ContentsURL: String(""), 260 PreviousFilename: String(""), 261 } 262 want := `github.CommitFile{SHA:"", Filename:"", Additions:0, Deletions:0, Changes:0, Status:"", Patch:"", BlobURL:"", RawURL:"", ContentsURL:"", PreviousFilename:""}` 263 if got := v.String(); got != want { 264 t.Errorf("CommitFile.String = %v, want %v", got, want) 265 } 266 } 267 268 func TestCommitStats_String(t *testing.T) { 269 v := CommitStats{ 270 Additions: Int(0), 271 Deletions: Int(0), 272 Total: Int(0), 273 } 274 want := `github.CommitStats{Additions:0, Deletions:0, Total:0}` 275 if got := v.String(); got != want { 276 t.Errorf("CommitStats.String = %v, want %v", got, want) 277 } 278 } 279 280 func TestCommitsComparison_String(t *testing.T) { 281 v := CommitsComparison{ 282 BaseCommit: &RepositoryCommit{}, 283 MergeBaseCommit: &RepositoryCommit{}, 284 Status: String(""), 285 AheadBy: Int(0), 286 BehindBy: Int(0), 287 TotalCommits: Int(0), 288 HTMLURL: String(""), 289 PermalinkURL: String(""), 290 DiffURL: String(""), 291 PatchURL: String(""), 292 URL: String(""), 293 } 294 want := `github.CommitsComparison{BaseCommit:github.RepositoryCommit{}, MergeBaseCommit:github.RepositoryCommit{}, Status:"", AheadBy:0, BehindBy:0, TotalCommits:0, HTMLURL:"", PermalinkURL:"", DiffURL:"", PatchURL:"", URL:""}` 295 if got := v.String(); got != want { 296 t.Errorf("CommitsComparison.String = %v, want %v", got, want) 297 } 298 } 299 300 func TestContributorStats_String(t *testing.T) { 301 v := ContributorStats{ 302 Author: &Contributor{}, 303 Total: Int(0), 304 } 305 want := `github.ContributorStats{Author:github.Contributor{}, Total:0}` 306 if got := v.String(); got != want { 307 t.Errorf("ContributorStats.String = %v, want %v", got, want) 308 } 309 } 310 311 func TestDiscussionComment_String(t *testing.T) { 312 v := DiscussionComment{ 313 Author: &User{}, 314 Body: String(""), 315 BodyHTML: String(""), 316 BodyVersion: String(""), 317 CreatedAt: &Timestamp{}, 318 LastEditedAt: &Timestamp{}, 319 DiscussionURL: String(""), 320 HTMLURL: String(""), 321 NodeID: String(""), 322 Number: Int(0), 323 UpdatedAt: &Timestamp{}, 324 URL: String(""), 325 Reactions: &Reactions{}, 326 } 327 want := `github.DiscussionComment{Author:github.User{}, Body:"", BodyHTML:"", BodyVersion:"", CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, LastEditedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, DiscussionURL:"", HTMLURL:"", NodeID:"", Number:0, UpdatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, URL:"", Reactions:github.Reactions{}}` 328 if got := v.String(); got != want { 329 t.Errorf("DiscussionComment.String = %v, want %v", got, want) 330 } 331 } 332 333 func TestDraftReviewComment_String(t *testing.T) { 334 v := DraftReviewComment{ 335 Path: String(""), 336 Position: Int(0), 337 Body: String(""), 338 StartSide: String(""), 339 Side: String(""), 340 StartLine: Int(0), 341 Line: Int(0), 342 } 343 want := `github.DraftReviewComment{Path:"", Position:0, Body:"", StartSide:"", Side:"", StartLine:0, Line:0}` 344 if got := v.String(); got != want { 345 t.Errorf("DraftReviewComment.String = %v, want %v", got, want) 346 } 347 } 348 349 func TestEnterprise_String(t *testing.T) { 350 v := Enterprise{ 351 ID: Int(0), 352 Slug: String(""), 353 Name: String(""), 354 NodeID: String(""), 355 AvatarURL: String(""), 356 Description: String(""), 357 WebsiteURL: String(""), 358 HTMLURL: String(""), 359 CreatedAt: &Timestamp{}, 360 UpdatedAt: &Timestamp{}, 361 } 362 want := `github.Enterprise{ID:0, Slug:"", Name:"", NodeID:"", AvatarURL:"", Description:"", WebsiteURL:"", HTMLURL:"", CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, UpdatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}}` 363 if got := v.String(); got != want { 364 t.Errorf("Enterprise.String = %v, want %v", got, want) 365 } 366 } 367 368 func TestEvent_String(t *testing.T) { 369 v := Event{ 370 Type: String(""), 371 Public: Bool(false), 372 Repo: &Repository{}, 373 Actor: &User{}, 374 Org: &Organization{}, 375 ID: String(""), 376 } 377 want := `github.Event{Type:"", Public:false, Repo:github.Repository{}, Actor:github.User{}, Org:github.Organization{}, ID:""}` 378 if got := v.String(); got != want { 379 t.Errorf("Event.String = %v, want %v", got, want) 380 } 381 } 382 383 func TestGPGKey_String(t *testing.T) { 384 v := GPGKey{ 385 ID: Int64(0), 386 PrimaryKeyID: Int64(0), 387 KeyID: String(""), 388 RawKey: String(""), 389 PublicKey: String(""), 390 CanSign: Bool(false), 391 CanEncryptComms: Bool(false), 392 CanEncryptStorage: Bool(false), 393 CanCertify: Bool(false), 394 } 395 want := `github.GPGKey{ID:0, PrimaryKeyID:0, KeyID:"", RawKey:"", PublicKey:"", CanSign:false, CanEncryptComms:false, CanEncryptStorage:false, CanCertify:false}` 396 if got := v.String(); got != want { 397 t.Errorf("GPGKey.String = %v, want %v", got, want) 398 } 399 } 400 401 func TestGist_String(t *testing.T) { 402 v := Gist{ 403 ID: String(""), 404 Description: String(""), 405 Public: Bool(false), 406 Owner: &User{}, 407 Comments: Int(0), 408 HTMLURL: String(""), 409 GitPullURL: String(""), 410 GitPushURL: String(""), 411 NodeID: String(""), 412 } 413 want := `github.Gist{ID:"", Description:"", Public:false, Owner:github.User{}, Comments:0, HTMLURL:"", GitPullURL:"", GitPushURL:"", NodeID:""}` 414 if got := v.String(); got != want { 415 t.Errorf("Gist.String = %v, want %v", got, want) 416 } 417 } 418 419 func TestGistComment_String(t *testing.T) { 420 v := GistComment{ 421 ID: Int64(0), 422 URL: String(""), 423 Body: String(""), 424 User: &User{}, 425 } 426 want := `github.GistComment{ID:0, URL:"", Body:"", User:github.User{}}` 427 if got := v.String(); got != want { 428 t.Errorf("GistComment.String = %v, want %v", got, want) 429 } 430 } 431 432 func TestGistCommit_String(t *testing.T) { 433 v := GistCommit{ 434 URL: String(""), 435 Version: String(""), 436 User: &User{}, 437 ChangeStatus: &CommitStats{}, 438 CommittedAt: &Timestamp{}, 439 NodeID: String(""), 440 } 441 want := `github.GistCommit{URL:"", Version:"", User:github.User{}, ChangeStatus:github.CommitStats{}, CommittedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, NodeID:""}` 442 if got := v.String(); got != want { 443 t.Errorf("GistCommit.String = %v, want %v", got, want) 444 } 445 } 446 447 func TestGistFile_String(t *testing.T) { 448 v := GistFile{ 449 Size: Int(0), 450 Filename: String(""), 451 Language: String(""), 452 Type: String(""), 453 RawURL: String(""), 454 Content: String(""), 455 } 456 want := `github.GistFile{Size:0, Filename:"", Language:"", Type:"", RawURL:"", Content:""}` 457 if got := v.String(); got != want { 458 t.Errorf("GistFile.String = %v, want %v", got, want) 459 } 460 } 461 462 func TestGistFork_String(t *testing.T) { 463 v := GistFork{ 464 URL: String(""), 465 User: &User{}, 466 ID: String(""), 467 CreatedAt: &Timestamp{}, 468 UpdatedAt: &Timestamp{}, 469 NodeID: String(""), 470 } 471 want := `github.GistFork{URL:"", User:github.User{}, ID:"", CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, UpdatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, NodeID:""}` 472 if got := v.String(); got != want { 473 t.Errorf("GistFork.String = %v, want %v", got, want) 474 } 475 } 476 477 func TestGistStats_String(t *testing.T) { 478 v := GistStats{ 479 TotalGists: Int(0), 480 PrivateGists: Int(0), 481 PublicGists: Int(0), 482 } 483 want := `github.GistStats{TotalGists:0, PrivateGists:0, PublicGists:0}` 484 if got := v.String(); got != want { 485 t.Errorf("GistStats.String = %v, want %v", got, want) 486 } 487 } 488 489 func TestGitObject_String(t *testing.T) { 490 v := GitObject{ 491 Type: String(""), 492 SHA: String(""), 493 URL: String(""), 494 } 495 want := `github.GitObject{Type:"", SHA:"", URL:""}` 496 if got := v.String(); got != want { 497 t.Errorf("GitObject.String = %v, want %v", got, want) 498 } 499 } 500 501 func TestGitignore_String(t *testing.T) { 502 v := Gitignore{ 503 Name: String(""), 504 Source: String(""), 505 } 506 want := `github.Gitignore{Name:"", Source:""}` 507 if got := v.String(); got != want { 508 t.Errorf("Gitignore.String = %v, want %v", got, want) 509 } 510 } 511 512 func TestGrant_String(t *testing.T) { 513 v := Grant{ 514 ID: Int64(0), 515 URL: String(""), 516 App: &AuthorizationApp{}, 517 CreatedAt: &Timestamp{}, 518 UpdatedAt: &Timestamp{}, 519 } 520 want := `github.Grant{ID:0, URL:"", App:github.AuthorizationApp{}, CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, UpdatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}}` 521 if got := v.String(); got != want { 522 t.Errorf("Grant.String = %v, want %v", got, want) 523 } 524 } 525 526 func TestHeadCommit_String(t *testing.T) { 527 v := HeadCommit{ 528 Message: String(""), 529 Author: &CommitAuthor{}, 530 URL: String(""), 531 Distinct: Bool(false), 532 SHA: String(""), 533 ID: String(""), 534 TreeID: String(""), 535 Timestamp: &Timestamp{}, 536 Committer: &CommitAuthor{}, 537 } 538 want := `github.HeadCommit{Message:"", Author:github.CommitAuthor{}, URL:"", Distinct:false, SHA:"", ID:"", TreeID:"", Timestamp:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, Committer:github.CommitAuthor{}}` 539 if got := v.String(); got != want { 540 t.Errorf("HeadCommit.String = %v, want %v", got, want) 541 } 542 } 543 544 func TestHook_String(t *testing.T) { 545 v := Hook{ 546 URL: String(""), 547 ID: Int64(0), 548 Type: String(""), 549 Name: String(""), 550 TestURL: String(""), 551 PingURL: String(""), 552 Active: Bool(false), 553 } 554 want := `github.Hook{URL:"", ID:0, Type:"", Name:"", TestURL:"", PingURL:"", Active:false}` 555 if got := v.String(); got != want { 556 t.Errorf("Hook.String = %v, want %v", got, want) 557 } 558 } 559 560 func TestHookDelivery_String(t *testing.T) { 561 v := HookDelivery{ 562 ID: Int64(0), 563 GUID: String(""), 564 DeliveredAt: &Timestamp{}, 565 Redelivery: Bool(false), 566 Duration: Float64(0.0), 567 Status: String(""), 568 StatusCode: Int(0), 569 Event: String(""), 570 Action: String(""), 571 InstallationID: Int64(0), 572 RepositoryID: Int64(0), 573 Request: &HookRequest{}, 574 Response: &HookResponse{}, 575 } 576 want := `github.HookDelivery{ID:0, GUID:"", DeliveredAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, Redelivery:false, Duration:0, Status:"", StatusCode:0, Event:"", Action:"", InstallationID:0, RepositoryID:0, Request:github.HookRequest{}, Response:github.HookResponse{}}` 577 if got := v.String(); got != want { 578 t.Errorf("HookDelivery.String = %v, want %v", got, want) 579 } 580 } 581 582 func TestHookStats_String(t *testing.T) { 583 v := HookStats{ 584 TotalHooks: Int(0), 585 ActiveHooks: Int(0), 586 InactiveHooks: Int(0), 587 } 588 want := `github.HookStats{TotalHooks:0, ActiveHooks:0, InactiveHooks:0}` 589 if got := v.String(); got != want { 590 t.Errorf("HookStats.String = %v, want %v", got, want) 591 } 592 } 593 594 func TestImport_String(t *testing.T) { 595 v := Import{ 596 VCSURL: String(""), 597 VCS: String(""), 598 VCSUsername: String(""), 599 VCSPassword: String(""), 600 TFVCProject: String(""), 601 UseLFS: String(""), 602 HasLargeFiles: Bool(false), 603 LargeFilesSize: Int(0), 604 LargeFilesCount: Int(0), 605 Status: String(""), 606 CommitCount: Int(0), 607 StatusText: String(""), 608 AuthorsCount: Int(0), 609 Percent: Int(0), 610 PushPercent: Int(0), 611 URL: String(""), 612 HTMLURL: String(""), 613 AuthorsURL: String(""), 614 RepositoryURL: String(""), 615 Message: String(""), 616 FailedStep: String(""), 617 HumanName: String(""), 618 } 619 want := `github.Import{VCSURL:"", VCS:"", VCSUsername:"", VCSPassword:"", TFVCProject:"", UseLFS:"", HasLargeFiles:false, LargeFilesSize:0, LargeFilesCount:0, Status:"", CommitCount:0, StatusText:"", AuthorsCount:0, Percent:0, PushPercent:0, URL:"", HTMLURL:"", AuthorsURL:"", RepositoryURL:"", Message:"", FailedStep:"", HumanName:""}` 620 if got := v.String(); got != want { 621 t.Errorf("Import.String = %v, want %v", got, want) 622 } 623 } 624 625 func TestInstallation_String(t *testing.T) { 626 v := Installation{ 627 ID: Int64(0), 628 NodeID: String(""), 629 AppID: Int64(0), 630 AppSlug: String(""), 631 TargetID: Int64(0), 632 Account: &User{}, 633 AccessTokensURL: String(""), 634 RepositoriesURL: String(""), 635 HTMLURL: String(""), 636 TargetType: String(""), 637 SingleFileName: String(""), 638 RepositorySelection: String(""), 639 Permissions: &InstallationPermissions{}, 640 CreatedAt: &Timestamp{}, 641 UpdatedAt: &Timestamp{}, 642 HasMultipleSingleFiles: Bool(false), 643 SuspendedBy: &User{}, 644 SuspendedAt: &Timestamp{}, 645 } 646 want := `github.Installation{ID:0, NodeID:"", AppID:0, AppSlug:"", TargetID:0, Account:github.User{}, AccessTokensURL:"", RepositoriesURL:"", HTMLURL:"", TargetType:"", SingleFileName:"", RepositorySelection:"", Permissions:github.InstallationPermissions{}, CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, UpdatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, HasMultipleSingleFiles:false, SuspendedBy:github.User{}, SuspendedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}}` 647 if got := v.String(); got != want { 648 t.Errorf("Installation.String = %v, want %v", got, want) 649 } 650 } 651 652 func TestInvitation_String(t *testing.T) { 653 v := Invitation{ 654 ID: Int64(0), 655 NodeID: String(""), 656 Login: String(""), 657 Email: String(""), 658 Role: String(""), 659 Inviter: &User{}, 660 TeamCount: Int(0), 661 InvitationTeamURL: String(""), 662 FailedAt: &Timestamp{}, 663 FailedReason: String(""), 664 } 665 want := `github.Invitation{ID:0, NodeID:"", Login:"", Email:"", Role:"", Inviter:github.User{}, TeamCount:0, InvitationTeamURL:"", FailedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, FailedReason:""}` 666 if got := v.String(); got != want { 667 t.Errorf("Invitation.String = %v, want %v", got, want) 668 } 669 } 670 671 func TestIssue_String(t *testing.T) { 672 v := Issue{ 673 ID: Int64(0), 674 Number: Int(0), 675 State: String(""), 676 Locked: Bool(false), 677 Title: String(""), 678 Body: String(""), 679 AuthorAssociation: String(""), 680 User: &User{}, 681 Assignee: &User{}, 682 Comments: Int(0), 683 ClosedBy: &User{}, 684 URL: String(""), 685 HTMLURL: String(""), 686 CommentsURL: String(""), 687 EventsURL: String(""), 688 LabelsURL: String(""), 689 RepositoryURL: String(""), 690 Milestone: &Milestone{}, 691 PullRequestLinks: &PullRequestLinks{}, 692 Repository: &Repository{}, 693 Reactions: &Reactions{}, 694 NodeID: String(""), 695 ActiveLockReason: String(""), 696 } 697 want := `github.Issue{ID:0, Number:0, State:"", Locked:false, Title:"", Body:"", AuthorAssociation:"", User:github.User{}, Assignee:github.User{}, Comments:0, ClosedBy:github.User{}, URL:"", HTMLURL:"", CommentsURL:"", EventsURL:"", LabelsURL:"", RepositoryURL:"", Milestone:github.Milestone{}, PullRequestLinks:github.PullRequestLinks{}, Repository:github.Repository{}, Reactions:github.Reactions{}, NodeID:"", ActiveLockReason:""}` 698 if got := v.String(); got != want { 699 t.Errorf("Issue.String = %v, want %v", got, want) 700 } 701 } 702 703 func TestIssueComment_String(t *testing.T) { 704 v := IssueComment{ 705 ID: Int64(0), 706 NodeID: String(""), 707 Body: String(""), 708 User: &User{}, 709 Reactions: &Reactions{}, 710 AuthorAssociation: String(""), 711 URL: String(""), 712 HTMLURL: String(""), 713 IssueURL: String(""), 714 } 715 want := `github.IssueComment{ID:0, NodeID:"", Body:"", User:github.User{}, Reactions:github.Reactions{}, AuthorAssociation:"", URL:"", HTMLURL:"", IssueURL:""}` 716 if got := v.String(); got != want { 717 t.Errorf("IssueComment.String = %v, want %v", got, want) 718 } 719 } 720 721 func TestIssueStats_String(t *testing.T) { 722 v := IssueStats{ 723 TotalIssues: Int(0), 724 OpenIssues: Int(0), 725 ClosedIssues: Int(0), 726 } 727 want := `github.IssueStats{TotalIssues:0, OpenIssues:0, ClosedIssues:0}` 728 if got := v.String(); got != want { 729 t.Errorf("IssueStats.String = %v, want %v", got, want) 730 } 731 } 732 733 func TestKey_String(t *testing.T) { 734 v := Key{ 735 ID: Int64(0), 736 Key: String(""), 737 URL: String(""), 738 Title: String(""), 739 ReadOnly: Bool(false), 740 Verified: Bool(false), 741 CreatedAt: &Timestamp{}, 742 } 743 want := `github.Key{ID:0, Key:"", URL:"", Title:"", ReadOnly:false, Verified:false, CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}}` 744 if got := v.String(); got != want { 745 t.Errorf("Key.String = %v, want %v", got, want) 746 } 747 } 748 749 func TestLabel_String(t *testing.T) { 750 v := Label{ 751 ID: Int64(0), 752 URL: String(""), 753 Name: String(""), 754 Color: String(""), 755 Description: String(""), 756 Default: Bool(false), 757 NodeID: String(""), 758 } 759 want := `github.Label{ID:0, URL:"", Name:"", Color:"", Description:"", Default:false, NodeID:""}` 760 if got := v.String(); got != want { 761 t.Errorf("Label.String = %v, want %v", got, want) 762 } 763 } 764 765 func TestLabelResult_String(t *testing.T) { 766 v := LabelResult{ 767 ID: Int64(0), 768 URL: String(""), 769 Name: String(""), 770 Color: String(""), 771 Default: Bool(false), 772 Description: String(""), 773 Score: Float64(0.0), 774 } 775 want := `github.LabelResult{ID:0, URL:"", Name:"", Color:"", Default:false, Description:"", Score:0}` 776 if got := v.String(); got != want { 777 t.Errorf("LabelResult.String = %v, want %v", got, want) 778 } 779 } 780 781 func TestLargeFile_String(t *testing.T) { 782 v := LargeFile{ 783 RefName: String(""), 784 Path: String(""), 785 OID: String(""), 786 Size: Int(0), 787 } 788 want := `github.LargeFile{RefName:"", Path:"", OID:"", Size:0}` 789 if got := v.String(); got != want { 790 t.Errorf("LargeFile.String = %v, want %v", got, want) 791 } 792 } 793 794 func TestLicense_String(t *testing.T) { 795 v := License{ 796 Key: String(""), 797 Name: String(""), 798 URL: String(""), 799 SPDXID: String(""), 800 HTMLURL: String(""), 801 Featured: Bool(false), 802 Description: String(""), 803 Implementation: String(""), 804 Body: String(""), 805 } 806 want := `github.License{Key:"", Name:"", URL:"", SPDXID:"", HTMLURL:"", Featured:false, Description:"", Implementation:"", Body:""}` 807 if got := v.String(); got != want { 808 t.Errorf("License.String = %v, want %v", got, want) 809 } 810 } 811 812 func TestMembership_String(t *testing.T) { 813 v := Membership{ 814 URL: String(""), 815 State: String(""), 816 Role: String(""), 817 OrganizationURL: String(""), 818 Organization: &Organization{}, 819 User: &User{}, 820 } 821 want := `github.Membership{URL:"", State:"", Role:"", OrganizationURL:"", Organization:github.Organization{}, User:github.User{}}` 822 if got := v.String(); got != want { 823 t.Errorf("Membership.String = %v, want %v", got, want) 824 } 825 } 826 827 func TestMigration_String(t *testing.T) { 828 v := Migration{ 829 ID: Int64(0), 830 GUID: String(""), 831 State: String(""), 832 LockRepositories: Bool(false), 833 ExcludeAttachments: Bool(false), 834 URL: String(""), 835 CreatedAt: String(""), 836 UpdatedAt: String(""), 837 } 838 want := `github.Migration{ID:0, GUID:"", State:"", LockRepositories:false, ExcludeAttachments:false, URL:"", CreatedAt:"", UpdatedAt:""}` 839 if got := v.String(); got != want { 840 t.Errorf("Migration.String = %v, want %v", got, want) 841 } 842 } 843 844 func TestMilestone_String(t *testing.T) { 845 v := Milestone{ 846 URL: String(""), 847 HTMLURL: String(""), 848 LabelsURL: String(""), 849 ID: Int64(0), 850 Number: Int(0), 851 State: String(""), 852 Title: String(""), 853 Description: String(""), 854 Creator: &User{}, 855 OpenIssues: Int(0), 856 ClosedIssues: Int(0), 857 NodeID: String(""), 858 } 859 want := `github.Milestone{URL:"", HTMLURL:"", LabelsURL:"", ID:0, Number:0, State:"", Title:"", Description:"", Creator:github.User{}, OpenIssues:0, ClosedIssues:0, NodeID:""}` 860 if got := v.String(); got != want { 861 t.Errorf("Milestone.String = %v, want %v", got, want) 862 } 863 } 864 865 func TestMilestoneStats_String(t *testing.T) { 866 v := MilestoneStats{ 867 TotalMilestones: Int(0), 868 OpenMilestones: Int(0), 869 ClosedMilestones: Int(0), 870 } 871 want := `github.MilestoneStats{TotalMilestones:0, OpenMilestones:0, ClosedMilestones:0}` 872 if got := v.String(); got != want { 873 t.Errorf("MilestoneStats.String = %v, want %v", got, want) 874 } 875 } 876 877 func TestNewTeam_String(t *testing.T) { 878 v := NewTeam{ 879 Name: "", 880 Description: String(""), 881 ParentTeamID: Int64(0), 882 Permission: String(""), 883 Privacy: String(""), 884 LDAPDN: String(""), 885 } 886 want := `github.NewTeam{Name:"", Description:"", ParentTeamID:0, Permission:"", Privacy:"", LDAPDN:""}` 887 if got := v.String(); got != want { 888 t.Errorf("NewTeam.String = %v, want %v", got, want) 889 } 890 } 891 892 func TestOAuthAPP_String(t *testing.T) { 893 v := OAuthAPP{ 894 URL: String(""), 895 Name: String(""), 896 ClientID: String(""), 897 } 898 want := `github.OAuthAPP{URL:"", Name:"", ClientID:""}` 899 if got := v.String(); got != want { 900 t.Errorf("OAuthAPP.String = %v, want %v", got, want) 901 } 902 } 903 904 func TestOrgStats_String(t *testing.T) { 905 v := OrgStats{ 906 TotalOrgs: Int(0), 907 DisabledOrgs: Int(0), 908 TotalTeams: Int(0), 909 TotalTeamMembers: Int(0), 910 } 911 want := `github.OrgStats{TotalOrgs:0, DisabledOrgs:0, TotalTeams:0, TotalTeamMembers:0}` 912 if got := v.String(); got != want { 913 t.Errorf("OrgStats.String = %v, want %v", got, want) 914 } 915 } 916 917 func TestOrganization_String(t *testing.T) { 918 v := Organization{ 919 Login: String(""), 920 ID: Int64(0), 921 NodeID: String(""), 922 AvatarURL: String(""), 923 HTMLURL: String(""), 924 Name: String(""), 925 Company: String(""), 926 Blog: String(""), 927 Location: String(""), 928 Email: String(""), 929 TwitterUsername: String(""), 930 Description: String(""), 931 PublicRepos: Int(0), 932 PublicGists: Int(0), 933 Followers: Int(0), 934 Following: Int(0), 935 TotalPrivateRepos: Int(0), 936 OwnedPrivateRepos: Int(0), 937 PrivateGists: Int(0), 938 DiskUsage: Int(0), 939 Collaborators: Int(0), 940 BillingEmail: String(""), 941 Type: String(""), 942 Plan: &Plan{}, 943 TwoFactorRequirementEnabled: Bool(false), 944 IsVerified: Bool(false), 945 HasOrganizationProjects: Bool(false), 946 HasRepositoryProjects: Bool(false), 947 DefaultRepoPermission: String(""), 948 DefaultRepoSettings: String(""), 949 MembersCanCreateRepos: Bool(false), 950 MembersCanCreatePublicRepos: Bool(false), 951 MembersCanCreatePrivateRepos: Bool(false), 952 MembersCanCreateInternalRepos: Bool(false), 953 MembersAllowedRepositoryCreationType: String(""), 954 MembersCanCreatePages: Bool(false), 955 MembersCanCreatePublicPages: Bool(false), 956 MembersCanCreatePrivatePages: Bool(false), 957 URL: String(""), 958 EventsURL: String(""), 959 HooksURL: String(""), 960 IssuesURL: String(""), 961 MembersURL: String(""), 962 PublicMembersURL: String(""), 963 ReposURL: String(""), 964 } 965 want := `github.Organization{Login:"", ID:0, NodeID:"", AvatarURL:"", HTMLURL:"", Name:"", Company:"", Blog:"", Location:"", Email:"", TwitterUsername:"", Description:"", PublicRepos:0, PublicGists:0, Followers:0, Following:0, TotalPrivateRepos:0, OwnedPrivateRepos:0, PrivateGists:0, DiskUsage:0, Collaborators:0, BillingEmail:"", Type:"", Plan:github.Plan{}, TwoFactorRequirementEnabled:false, IsVerified:false, HasOrganizationProjects:false, HasRepositoryProjects:false, DefaultRepoPermission:"", DefaultRepoSettings:"", MembersCanCreateRepos:false, MembersCanCreatePublicRepos:false, MembersCanCreatePrivateRepos:false, MembersCanCreateInternalRepos:false, MembersAllowedRepositoryCreationType:"", MembersCanCreatePages:false, MembersCanCreatePublicPages:false, MembersCanCreatePrivatePages:false, URL:"", EventsURL:"", HooksURL:"", IssuesURL:"", MembersURL:"", PublicMembersURL:"", ReposURL:""}` 966 if got := v.String(); got != want { 967 t.Errorf("Organization.String = %v, want %v", got, want) 968 } 969 } 970 971 func TestPackage_String(t *testing.T) { 972 v := Package{ 973 ID: Int64(0), 974 Name: String(""), 975 PackageType: String(""), 976 HTMLURL: String(""), 977 CreatedAt: &Timestamp{}, 978 UpdatedAt: &Timestamp{}, 979 Owner: &User{}, 980 PackageVersion: &PackageVersion{}, 981 Registry: &PackageRegistry{}, 982 URL: String(""), 983 VersionCount: Int64(0), 984 Visibility: String(""), 985 Repository: &Repository{}, 986 } 987 want := `github.Package{ID:0, Name:"", PackageType:"", HTMLURL:"", CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, UpdatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, Owner:github.User{}, PackageVersion:github.PackageVersion{}, Registry:github.PackageRegistry{}, URL:"", VersionCount:0, Visibility:"", Repository:github.Repository{}}` 988 if got := v.String(); got != want { 989 t.Errorf("Package.String = %v, want %v", got, want) 990 } 991 } 992 993 func TestPackageFile_String(t *testing.T) { 994 v := PackageFile{ 995 DownloadURL: String(""), 996 ID: Int64(0), 997 Name: String(""), 998 SHA256: String(""), 999 SHA1: String(""), 1000 MD5: String(""), 1001 ContentType: String(""), 1002 State: String(""), 1003 Author: &User{}, 1004 Size: Int64(0), 1005 CreatedAt: &Timestamp{}, 1006 UpdatedAt: &Timestamp{}, 1007 } 1008 want := `github.PackageFile{DownloadURL:"", ID:0, Name:"", SHA256:"", SHA1:"", MD5:"", ContentType:"", State:"", Author:github.User{}, Size:0, CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, UpdatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}}` 1009 if got := v.String(); got != want { 1010 t.Errorf("PackageFile.String = %v, want %v", got, want) 1011 } 1012 } 1013 1014 func TestPackageMetadata_String(t *testing.T) { 1015 v := PackageMetadata{ 1016 PackageType: String(""), 1017 Container: &PackageContainerMetadata{}, 1018 } 1019 want := `github.PackageMetadata{PackageType:"", Container:github.PackageContainerMetadata{}}` 1020 if got := v.String(); got != want { 1021 t.Errorf("PackageMetadata.String = %v, want %v", got, want) 1022 } 1023 } 1024 1025 func TestPackageRegistry_String(t *testing.T) { 1026 v := PackageRegistry{ 1027 AboutURL: String(""), 1028 Name: String(""), 1029 Type: String(""), 1030 URL: String(""), 1031 Vendor: String(""), 1032 } 1033 want := `github.PackageRegistry{AboutURL:"", Name:"", Type:"", URL:"", Vendor:""}` 1034 if got := v.String(); got != want { 1035 t.Errorf("PackageRegistry.String = %v, want %v", got, want) 1036 } 1037 } 1038 1039 func TestPackageRelease_String(t *testing.T) { 1040 v := PackageRelease{ 1041 URL: String(""), 1042 HTMLURL: String(""), 1043 ID: Int64(0), 1044 TagName: String(""), 1045 TargetCommitish: String(""), 1046 Name: String(""), 1047 Draft: Bool(false), 1048 Author: &User{}, 1049 Prerelease: Bool(false), 1050 CreatedAt: &Timestamp{}, 1051 PublishedAt: &Timestamp{}, 1052 } 1053 want := `github.PackageRelease{URL:"", HTMLURL:"", ID:0, TagName:"", TargetCommitish:"", Name:"", Draft:false, Author:github.User{}, Prerelease:false, CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, PublishedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}}` 1054 if got := v.String(); got != want { 1055 t.Errorf("PackageRelease.String = %v, want %v", got, want) 1056 } 1057 } 1058 1059 func TestPackageVersion_String(t *testing.T) { 1060 v := PackageVersion{ 1061 ID: Int64(0), 1062 Version: String(""), 1063 Summary: String(""), 1064 Body: String(""), 1065 BodyHTML: String(""), 1066 Release: &PackageRelease{}, 1067 Manifest: String(""), 1068 HTMLURL: String(""), 1069 TagName: String(""), 1070 TargetCommitish: String(""), 1071 TargetOID: String(""), 1072 Draft: Bool(false), 1073 Prerelease: Bool(false), 1074 CreatedAt: &Timestamp{}, 1075 UpdatedAt: &Timestamp{}, 1076 Author: &User{}, 1077 InstallationCommand: String(""), 1078 Metadata: &PackageMetadata{}, 1079 PackageHTMLURL: String(""), 1080 Name: String(""), 1081 URL: String(""), 1082 } 1083 want := `github.PackageVersion{ID:0, Version:"", Summary:"", Body:"", BodyHTML:"", Release:github.PackageRelease{}, Manifest:"", HTMLURL:"", TagName:"", TargetCommitish:"", TargetOID:"", Draft:false, Prerelease:false, CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, UpdatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, Author:github.User{}, InstallationCommand:"", Metadata:github.PackageMetadata{}, PackageHTMLURL:"", Name:"", URL:""}` 1084 if got := v.String(); got != want { 1085 t.Errorf("PackageVersion.String = %v, want %v", got, want) 1086 } 1087 } 1088 1089 func TestPageStats_String(t *testing.T) { 1090 v := PageStats{ 1091 TotalPages: Int(0), 1092 } 1093 want := `github.PageStats{TotalPages:0}` 1094 if got := v.String(); got != want { 1095 t.Errorf("PageStats.String = %v, want %v", got, want) 1096 } 1097 } 1098 1099 func TestPlan_String(t *testing.T) { 1100 v := Plan{ 1101 Name: String(""), 1102 Space: Int(0), 1103 Collaborators: Int(0), 1104 PrivateRepos: Int(0), 1105 FilledSeats: Int(0), 1106 Seats: Int(0), 1107 } 1108 want := `github.Plan{Name:"", Space:0, Collaborators:0, PrivateRepos:0, FilledSeats:0, Seats:0}` 1109 if got := v.String(); got != want { 1110 t.Errorf("Plan.String = %v, want %v", got, want) 1111 } 1112 } 1113 1114 func TestPreReceiveHook_String(t *testing.T) { 1115 v := PreReceiveHook{ 1116 ID: Int64(0), 1117 Name: String(""), 1118 Enforcement: String(""), 1119 ConfigURL: String(""), 1120 } 1121 want := `github.PreReceiveHook{ID:0, Name:"", Enforcement:"", ConfigURL:""}` 1122 if got := v.String(); got != want { 1123 t.Errorf("PreReceiveHook.String = %v, want %v", got, want) 1124 } 1125 } 1126 1127 func TestProject_String(t *testing.T) { 1128 v := Project{ 1129 ID: Int64(0), 1130 URL: String(""), 1131 HTMLURL: String(""), 1132 ColumnsURL: String(""), 1133 OwnerURL: String(""), 1134 Name: String(""), 1135 Body: String(""), 1136 Number: Int(0), 1137 State: String(""), 1138 CreatedAt: &Timestamp{}, 1139 UpdatedAt: &Timestamp{}, 1140 NodeID: String(""), 1141 OrganizationPermission: String(""), 1142 Private: Bool(false), 1143 Creator: &User{}, 1144 } 1145 want := `github.Project{ID:0, URL:"", HTMLURL:"", ColumnsURL:"", OwnerURL:"", Name:"", Body:"", Number:0, State:"", CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, UpdatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, NodeID:"", OrganizationPermission:"", Private:false, Creator:github.User{}}` 1146 if got := v.String(); got != want { 1147 t.Errorf("Project.String = %v, want %v", got, want) 1148 } 1149 } 1150 1151 func TestPullRequest_String(t *testing.T) { 1152 v := PullRequest{ 1153 ID: Int64(0), 1154 Number: Int(0), 1155 State: String(""), 1156 Locked: Bool(false), 1157 Title: String(""), 1158 Body: String(""), 1159 User: &User{}, 1160 Draft: Bool(false), 1161 Merged: Bool(false), 1162 Mergeable: Bool(false), 1163 MergeableState: String(""), 1164 MergedBy: &User{}, 1165 MergeCommitSHA: String(""), 1166 Rebaseable: Bool(false), 1167 Comments: Int(0), 1168 Commits: Int(0), 1169 Additions: Int(0), 1170 Deletions: Int(0), 1171 ChangedFiles: Int(0), 1172 URL: String(""), 1173 HTMLURL: String(""), 1174 IssueURL: String(""), 1175 StatusesURL: String(""), 1176 DiffURL: String(""), 1177 PatchURL: String(""), 1178 CommitsURL: String(""), 1179 CommentsURL: String(""), 1180 ReviewCommentsURL: String(""), 1181 ReviewCommentURL: String(""), 1182 ReviewComments: Int(0), 1183 Assignee: &User{}, 1184 Milestone: &Milestone{}, 1185 MaintainerCanModify: Bool(false), 1186 AuthorAssociation: String(""), 1187 NodeID: String(""), 1188 AutoMerge: &PullRequestAutoMerge{}, 1189 Links: &PRLinks{}, 1190 Head: &PullRequestBranch{}, 1191 Base: &PullRequestBranch{}, 1192 ActiveLockReason: String(""), 1193 } 1194 want := `github.PullRequest{ID:0, Number:0, State:"", Locked:false, Title:"", Body:"", User:github.User{}, Draft:false, Merged:false, Mergeable:false, MergeableState:"", MergedBy:github.User{}, MergeCommitSHA:"", Rebaseable:false, Comments:0, Commits:0, Additions:0, Deletions:0, ChangedFiles:0, URL:"", HTMLURL:"", IssueURL:"", StatusesURL:"", DiffURL:"", PatchURL:"", CommitsURL:"", CommentsURL:"", ReviewCommentsURL:"", ReviewCommentURL:"", ReviewComments:0, Assignee:github.User{}, Milestone:github.Milestone{}, MaintainerCanModify:false, AuthorAssociation:"", NodeID:"", AutoMerge:github.PullRequestAutoMerge{}, Links:github.PRLinks{}, Head:github.PullRequestBranch{}, Base:github.PullRequestBranch{}, ActiveLockReason:""}` 1195 if got := v.String(); got != want { 1196 t.Errorf("PullRequest.String = %v, want %v", got, want) 1197 } 1198 } 1199 1200 func TestPullRequestComment_String(t *testing.T) { 1201 v := PullRequestComment{ 1202 ID: Int64(0), 1203 NodeID: String(""), 1204 InReplyTo: Int64(0), 1205 Body: String(""), 1206 Path: String(""), 1207 DiffHunk: String(""), 1208 PullRequestReviewID: Int64(0), 1209 Position: Int(0), 1210 OriginalPosition: Int(0), 1211 StartLine: Int(0), 1212 Line: Int(0), 1213 OriginalLine: Int(0), 1214 OriginalStartLine: Int(0), 1215 Side: String(""), 1216 StartSide: String(""), 1217 CommitID: String(""), 1218 OriginalCommitID: String(""), 1219 User: &User{}, 1220 Reactions: &Reactions{}, 1221 AuthorAssociation: String(""), 1222 URL: String(""), 1223 HTMLURL: String(""), 1224 PullRequestURL: String(""), 1225 } 1226 want := `github.PullRequestComment{ID:0, NodeID:"", InReplyTo:0, Body:"", Path:"", DiffHunk:"", PullRequestReviewID:0, Position:0, OriginalPosition:0, StartLine:0, Line:0, OriginalLine:0, OriginalStartLine:0, Side:"", StartSide:"", CommitID:"", OriginalCommitID:"", User:github.User{}, Reactions:github.Reactions{}, AuthorAssociation:"", URL:"", HTMLURL:"", PullRequestURL:""}` 1227 if got := v.String(); got != want { 1228 t.Errorf("PullRequestComment.String = %v, want %v", got, want) 1229 } 1230 } 1231 1232 func TestPullRequestReview_String(t *testing.T) { 1233 v := PullRequestReview{ 1234 ID: Int64(0), 1235 NodeID: String(""), 1236 User: &User{}, 1237 Body: String(""), 1238 CommitID: String(""), 1239 HTMLURL: String(""), 1240 PullRequestURL: String(""), 1241 State: String(""), 1242 AuthorAssociation: String(""), 1243 } 1244 want := `github.PullRequestReview{ID:0, NodeID:"", User:github.User{}, Body:"", CommitID:"", HTMLURL:"", PullRequestURL:"", State:"", AuthorAssociation:""}` 1245 if got := v.String(); got != want { 1246 t.Errorf("PullRequestReview.String = %v, want %v", got, want) 1247 } 1248 } 1249 1250 func TestPullRequestReviewDismissalRequest_String(t *testing.T) { 1251 v := PullRequestReviewDismissalRequest{ 1252 Message: String(""), 1253 } 1254 want := `github.PullRequestReviewDismissalRequest{Message:""}` 1255 if got := v.String(); got != want { 1256 t.Errorf("PullRequestReviewDismissalRequest.String = %v, want %v", got, want) 1257 } 1258 } 1259 1260 func TestPullRequestReviewRequest_String(t *testing.T) { 1261 v := PullRequestReviewRequest{ 1262 NodeID: String(""), 1263 CommitID: String(""), 1264 Body: String(""), 1265 Event: String(""), 1266 } 1267 want := `github.PullRequestReviewRequest{NodeID:"", CommitID:"", Body:"", Event:""}` 1268 if got := v.String(); got != want { 1269 t.Errorf("PullRequestReviewRequest.String = %v, want %v", got, want) 1270 } 1271 } 1272 1273 func TestPullStats_String(t *testing.T) { 1274 v := PullStats{ 1275 TotalPulls: Int(0), 1276 MergedPulls: Int(0), 1277 MergablePulls: Int(0), 1278 UnmergablePulls: Int(0), 1279 } 1280 want := `github.PullStats{TotalPulls:0, MergedPulls:0, MergablePulls:0, UnmergablePulls:0}` 1281 if got := v.String(); got != want { 1282 t.Errorf("PullStats.String = %v, want %v", got, want) 1283 } 1284 } 1285 1286 func TestPushEvent_String(t *testing.T) { 1287 v := PushEvent{ 1288 PushID: Int64(0), 1289 Head: String(""), 1290 Ref: String(""), 1291 Size: Int(0), 1292 Before: String(""), 1293 DistinctSize: Int(0), 1294 After: String(""), 1295 Created: Bool(false), 1296 Deleted: Bool(false), 1297 Forced: Bool(false), 1298 BaseRef: String(""), 1299 Compare: String(""), 1300 Repo: &PushEventRepository{}, 1301 HeadCommit: &HeadCommit{}, 1302 Pusher: &User{}, 1303 Sender: &User{}, 1304 Installation: &Installation{}, 1305 Organization: &Organization{}, 1306 } 1307 want := `github.PushEvent{PushID:0, Head:"", Ref:"", Size:0, Before:"", DistinctSize:0, After:"", Created:false, Deleted:false, Forced:false, BaseRef:"", Compare:"", Repo:github.PushEventRepository{}, HeadCommit:github.HeadCommit{}, Pusher:github.User{}, Sender:github.User{}, Installation:github.Installation{}, Organization:github.Organization{}}` 1308 if got := v.String(); got != want { 1309 t.Errorf("PushEvent.String = %v, want %v", got, want) 1310 } 1311 } 1312 1313 func TestRate_String(t *testing.T) { 1314 v := Rate{ 1315 Limit: 0, 1316 Remaining: 0, 1317 Reset: Timestamp{}, 1318 } 1319 want := `github.Rate{Limit:0, Remaining:0, Reset:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}}` 1320 if got := v.String(); got != want { 1321 t.Errorf("Rate.String = %v, want %v", got, want) 1322 } 1323 } 1324 1325 func TestReaction_String(t *testing.T) { 1326 v := Reaction{ 1327 ID: Int64(0), 1328 User: &User{}, 1329 NodeID: String(""), 1330 Content: String(""), 1331 } 1332 want := `github.Reaction{ID:0, User:github.User{}, NodeID:"", Content:""}` 1333 if got := v.String(); got != want { 1334 t.Errorf("Reaction.String = %v, want %v", got, want) 1335 } 1336 } 1337 1338 func TestReference_String(t *testing.T) { 1339 v := Reference{ 1340 Ref: String(""), 1341 URL: String(""), 1342 Object: &GitObject{}, 1343 NodeID: String(""), 1344 } 1345 want := `github.Reference{Ref:"", URL:"", Object:github.GitObject{}, NodeID:""}` 1346 if got := v.String(); got != want { 1347 t.Errorf("Reference.String = %v, want %v", got, want) 1348 } 1349 } 1350 1351 func TestReleaseAsset_String(t *testing.T) { 1352 v := ReleaseAsset{ 1353 ID: Int64(0), 1354 URL: String(""), 1355 Name: String(""), 1356 Label: String(""), 1357 State: String(""), 1358 ContentType: String(""), 1359 Size: Int(0), 1360 DownloadCount: Int(0), 1361 CreatedAt: &Timestamp{}, 1362 UpdatedAt: &Timestamp{}, 1363 BrowserDownloadURL: String(""), 1364 Uploader: &User{}, 1365 NodeID: String(""), 1366 } 1367 want := `github.ReleaseAsset{ID:0, URL:"", Name:"", Label:"", State:"", ContentType:"", Size:0, DownloadCount:0, CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, UpdatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, BrowserDownloadURL:"", Uploader:github.User{}, NodeID:""}` 1368 if got := v.String(); got != want { 1369 t.Errorf("ReleaseAsset.String = %v, want %v", got, want) 1370 } 1371 } 1372 1373 func TestRename_String(t *testing.T) { 1374 v := Rename{ 1375 From: String(""), 1376 To: String(""), 1377 } 1378 want := `github.Rename{From:"", To:""}` 1379 if got := v.String(); got != want { 1380 t.Errorf("Rename.String = %v, want %v", got, want) 1381 } 1382 } 1383 1384 func TestRepoStats_String(t *testing.T) { 1385 v := RepoStats{ 1386 TotalRepos: Int(0), 1387 RootRepos: Int(0), 1388 ForkRepos: Int(0), 1389 OrgRepos: Int(0), 1390 TotalPushes: Int(0), 1391 TotalWikis: Int(0), 1392 } 1393 want := `github.RepoStats{TotalRepos:0, RootRepos:0, ForkRepos:0, OrgRepos:0, TotalPushes:0, TotalWikis:0}` 1394 if got := v.String(); got != want { 1395 t.Errorf("RepoStats.String = %v, want %v", got, want) 1396 } 1397 } 1398 1399 func TestRepoStatus_String(t *testing.T) { 1400 v := RepoStatus{ 1401 ID: Int64(0), 1402 NodeID: String(""), 1403 URL: String(""), 1404 State: String(""), 1405 TargetURL: String(""), 1406 Description: String(""), 1407 Context: String(""), 1408 AvatarURL: String(""), 1409 Creator: &User{}, 1410 } 1411 want := `github.RepoStatus{ID:0, NodeID:"", URL:"", State:"", TargetURL:"", Description:"", Context:"", AvatarURL:"", Creator:github.User{}}` 1412 if got := v.String(); got != want { 1413 t.Errorf("RepoStatus.String = %v, want %v", got, want) 1414 } 1415 } 1416 1417 func TestRepository_String(t *testing.T) { 1418 v := Repository{ 1419 ID: Int64(0), 1420 NodeID: String(""), 1421 Owner: &User{}, 1422 Name: String(""), 1423 FullName: String(""), 1424 Description: String(""), 1425 Homepage: String(""), 1426 CodeOfConduct: &CodeOfConduct{}, 1427 DefaultBranch: String(""), 1428 MasterBranch: String(""), 1429 CreatedAt: &Timestamp{}, 1430 PushedAt: &Timestamp{}, 1431 UpdatedAt: &Timestamp{}, 1432 HTMLURL: String(""), 1433 CloneURL: String(""), 1434 GitURL: String(""), 1435 MirrorURL: String(""), 1436 SSHURL: String(""), 1437 SVNURL: String(""), 1438 Language: String(""), 1439 Fork: Bool(false), 1440 ForksCount: Int(0), 1441 NetworkCount: Int(0), 1442 OpenIssuesCount: Int(0), 1443 OpenIssues: Int(0), 1444 StargazersCount: Int(0), 1445 SubscribersCount: Int(0), 1446 WatchersCount: Int(0), 1447 Watchers: Int(0), 1448 Size: Int(0), 1449 AutoInit: Bool(false), 1450 Parent: &Repository{}, 1451 Source: &Repository{}, 1452 TemplateRepository: &Repository{}, 1453 Organization: &Organization{}, 1454 AllowRebaseMerge: Bool(false), 1455 AllowSquashMerge: Bool(false), 1456 AllowMergeCommit: Bool(false), 1457 AllowAutoMerge: Bool(false), 1458 DeleteBranchOnMerge: Bool(false), 1459 Archived: Bool(false), 1460 Disabled: Bool(false), 1461 License: &License{}, 1462 Private: Bool(false), 1463 HasIssues: Bool(false), 1464 HasWiki: Bool(false), 1465 HasPages: Bool(false), 1466 HasProjects: Bool(false), 1467 HasDownloads: Bool(false), 1468 IsTemplate: Bool(false), 1469 LicenseTemplate: String(""), 1470 GitignoreTemplate: String(""), 1471 SecurityAndAnalysis: &SecurityAndAnalysis{}, 1472 TeamID: Int64(0), 1473 URL: String(""), 1474 ArchiveURL: String(""), 1475 AssigneesURL: String(""), 1476 BlobsURL: String(""), 1477 BranchesURL: String(""), 1478 CollaboratorsURL: String(""), 1479 CommentsURL: String(""), 1480 CommitsURL: String(""), 1481 CompareURL: String(""), 1482 ContentsURL: String(""), 1483 ContributorsURL: String(""), 1484 DeploymentsURL: String(""), 1485 DownloadsURL: String(""), 1486 EventsURL: String(""), 1487 ForksURL: String(""), 1488 GitCommitsURL: String(""), 1489 GitRefsURL: String(""), 1490 GitTagsURL: String(""), 1491 HooksURL: String(""), 1492 IssueCommentURL: String(""), 1493 IssueEventsURL: String(""), 1494 IssuesURL: String(""), 1495 KeysURL: String(""), 1496 LabelsURL: String(""), 1497 LanguagesURL: String(""), 1498 MergesURL: String(""), 1499 MilestonesURL: String(""), 1500 NotificationsURL: String(""), 1501 PullsURL: String(""), 1502 ReleasesURL: String(""), 1503 StargazersURL: String(""), 1504 StatusesURL: String(""), 1505 SubscribersURL: String(""), 1506 SubscriptionURL: String(""), 1507 TagsURL: String(""), 1508 TreesURL: String(""), 1509 TeamsURL: String(""), 1510 Visibility: String(""), 1511 } 1512 want := `github.Repository{ID:0, NodeID:"", Owner:github.User{}, Name:"", FullName:"", Description:"", Homepage:"", CodeOfConduct:github.CodeOfConduct{}, DefaultBranch:"", MasterBranch:"", CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, PushedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, UpdatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, HTMLURL:"", CloneURL:"", GitURL:"", MirrorURL:"", SSHURL:"", SVNURL:"", Language:"", Fork:false, ForksCount:0, NetworkCount:0, OpenIssuesCount:0, OpenIssues:0, StargazersCount:0, SubscribersCount:0, WatchersCount:0, Watchers:0, Size:0, AutoInit:false, Parent:github.Repository{}, Source:github.Repository{}, TemplateRepository:github.Repository{}, Organization:github.Organization{}, AllowRebaseMerge:false, AllowSquashMerge:false, AllowMergeCommit:false, AllowAutoMerge:false, DeleteBranchOnMerge:false, Archived:false, Disabled:false, License:github.License{}, Private:false, HasIssues:false, HasWiki:false, HasPages:false, HasProjects:false, HasDownloads:false, IsTemplate:false, LicenseTemplate:"", GitignoreTemplate:"", SecurityAndAnalysis:github.SecurityAndAnalysis{}, TeamID:0, URL:"", ArchiveURL:"", AssigneesURL:"", BlobsURL:"", BranchesURL:"", CollaboratorsURL:"", CommentsURL:"", CommitsURL:"", CompareURL:"", ContentsURL:"", ContributorsURL:"", DeploymentsURL:"", DownloadsURL:"", EventsURL:"", ForksURL:"", GitCommitsURL:"", GitRefsURL:"", GitTagsURL:"", HooksURL:"", IssueCommentURL:"", IssueEventsURL:"", IssuesURL:"", KeysURL:"", LabelsURL:"", LanguagesURL:"", MergesURL:"", MilestonesURL:"", NotificationsURL:"", PullsURL:"", ReleasesURL:"", StargazersURL:"", StatusesURL:"", SubscribersURL:"", SubscriptionURL:"", TagsURL:"", TreesURL:"", TeamsURL:"", Visibility:""}` 1513 if got := v.String(); got != want { 1514 t.Errorf("Repository.String = %v, want %v", got, want) 1515 } 1516 } 1517 1518 func TestRepositoryComment_String(t *testing.T) { 1519 v := RepositoryComment{ 1520 HTMLURL: String(""), 1521 URL: String(""), 1522 ID: Int64(0), 1523 NodeID: String(""), 1524 CommitID: String(""), 1525 User: &User{}, 1526 Reactions: &Reactions{}, 1527 Body: String(""), 1528 Path: String(""), 1529 Position: Int(0), 1530 } 1531 want := `github.RepositoryComment{HTMLURL:"", URL:"", ID:0, NodeID:"", CommitID:"", User:github.User{}, Reactions:github.Reactions{}, Body:"", Path:"", Position:0}` 1532 if got := v.String(); got != want { 1533 t.Errorf("RepositoryComment.String = %v, want %v", got, want) 1534 } 1535 } 1536 1537 func TestRepositoryCommit_String(t *testing.T) { 1538 v := RepositoryCommit{ 1539 NodeID: String(""), 1540 SHA: String(""), 1541 Commit: &Commit{}, 1542 Author: &User{}, 1543 Committer: &User{}, 1544 HTMLURL: String(""), 1545 URL: String(""), 1546 CommentsURL: String(""), 1547 Stats: &CommitStats{}, 1548 } 1549 want := `github.RepositoryCommit{NodeID:"", SHA:"", Commit:github.Commit{}, Author:github.User{}, Committer:github.User{}, HTMLURL:"", URL:"", CommentsURL:"", Stats:github.CommitStats{}}` 1550 if got := v.String(); got != want { 1551 t.Errorf("RepositoryCommit.String = %v, want %v", got, want) 1552 } 1553 } 1554 1555 func TestRepositoryContent_String(t *testing.T) { 1556 v := RepositoryContent{ 1557 Type: String(""), 1558 Target: String(""), 1559 Encoding: String(""), 1560 Size: Int(0), 1561 Name: String(""), 1562 Path: String(""), 1563 Content: String(""), 1564 SHA: String(""), 1565 URL: String(""), 1566 GitURL: String(""), 1567 HTMLURL: String(""), 1568 DownloadURL: String(""), 1569 } 1570 want := `github.RepositoryContent{Type:"", Target:"", Encoding:"", Size:0, Name:"", Path:"", Content:"", SHA:"", URL:"", GitURL:"", HTMLURL:"", DownloadURL:""}` 1571 if got := v.String(); got != want { 1572 t.Errorf("RepositoryContent.String = %v, want %v", got, want) 1573 } 1574 } 1575 1576 func TestRepositoryLicense_String(t *testing.T) { 1577 v := RepositoryLicense{ 1578 Name: String(""), 1579 Path: String(""), 1580 SHA: String(""), 1581 Size: Int(0), 1582 URL: String(""), 1583 HTMLURL: String(""), 1584 GitURL: String(""), 1585 DownloadURL: String(""), 1586 Type: String(""), 1587 Content: String(""), 1588 Encoding: String(""), 1589 License: &License{}, 1590 } 1591 want := `github.RepositoryLicense{Name:"", Path:"", SHA:"", Size:0, URL:"", HTMLURL:"", GitURL:"", DownloadURL:"", Type:"", Content:"", Encoding:"", License:github.License{}}` 1592 if got := v.String(); got != want { 1593 t.Errorf("RepositoryLicense.String = %v, want %v", got, want) 1594 } 1595 } 1596 1597 func TestRepositoryRelease_String(t *testing.T) { 1598 v := RepositoryRelease{ 1599 TagName: String(""), 1600 TargetCommitish: String(""), 1601 Name: String(""), 1602 Body: String(""), 1603 Draft: Bool(false), 1604 Prerelease: Bool(false), 1605 DiscussionCategoryName: String(""), 1606 GenerateReleaseNotes: Bool(false), 1607 ID: Int64(0), 1608 CreatedAt: &Timestamp{}, 1609 PublishedAt: &Timestamp{}, 1610 URL: String(""), 1611 HTMLURL: String(""), 1612 AssetsURL: String(""), 1613 UploadURL: String(""), 1614 ZipballURL: String(""), 1615 TarballURL: String(""), 1616 Author: &User{}, 1617 NodeID: String(""), 1618 } 1619 want := `github.RepositoryRelease{TagName:"", TargetCommitish:"", Name:"", Body:"", Draft:false, Prerelease:false, DiscussionCategoryName:"", GenerateReleaseNotes:false, ID:0, CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, PublishedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, URL:"", HTMLURL:"", AssetsURL:"", UploadURL:"", ZipballURL:"", TarballURL:"", Author:github.User{}, NodeID:""}` 1620 if got := v.String(); got != want { 1621 t.Errorf("RepositoryRelease.String = %v, want %v", got, want) 1622 } 1623 } 1624 1625 func TestSecretScanning_String(t *testing.T) { 1626 v := SecretScanning{ 1627 Status: String(""), 1628 } 1629 want := `github.SecretScanning{Status:""}` 1630 if got := v.String(); got != want { 1631 t.Errorf("SecretScanning.String = %v, want %v", got, want) 1632 } 1633 } 1634 1635 func TestSecurityAndAnalysis_String(t *testing.T) { 1636 v := SecurityAndAnalysis{ 1637 AdvancedSecurity: &AdvancedSecurity{}, 1638 SecretScanning: &SecretScanning{}, 1639 } 1640 want := `github.SecurityAndAnalysis{AdvancedSecurity:github.AdvancedSecurity{}, SecretScanning:github.SecretScanning{}}` 1641 if got := v.String(); got != want { 1642 t.Errorf("SecurityAndAnalysis.String = %v, want %v", got, want) 1643 } 1644 } 1645 1646 func TestSourceImportAuthor_String(t *testing.T) { 1647 v := SourceImportAuthor{ 1648 ID: Int64(0), 1649 RemoteID: String(""), 1650 RemoteName: String(""), 1651 Email: String(""), 1652 Name: String(""), 1653 URL: String(""), 1654 ImportURL: String(""), 1655 } 1656 want := `github.SourceImportAuthor{ID:0, RemoteID:"", RemoteName:"", Email:"", Name:"", URL:"", ImportURL:""}` 1657 if got := v.String(); got != want { 1658 t.Errorf("SourceImportAuthor.String = %v, want %v", got, want) 1659 } 1660 } 1661 1662 func TestTeam_String(t *testing.T) { 1663 v := Team{ 1664 ID: Int64(0), 1665 NodeID: String(""), 1666 Name: String(""), 1667 Description: String(""), 1668 URL: String(""), 1669 Slug: String(""), 1670 Permission: String(""), 1671 Privacy: String(""), 1672 MembersCount: Int(0), 1673 ReposCount: Int(0), 1674 Organization: &Organization{}, 1675 HTMLURL: String(""), 1676 MembersURL: String(""), 1677 RepositoriesURL: String(""), 1678 Parent: &Team{}, 1679 LDAPDN: String(""), 1680 } 1681 want := `github.Team{ID:0, NodeID:"", Name:"", Description:"", URL:"", Slug:"", Permission:"", Privacy:"", MembersCount:0, ReposCount:0, Organization:github.Organization{}, HTMLURL:"", MembersURL:"", RepositoriesURL:"", Parent:github.Team{}, LDAPDN:""}` 1682 if got := v.String(); got != want { 1683 t.Errorf("Team.String = %v, want %v", got, want) 1684 } 1685 } 1686 1687 func TestTeamDiscussion_String(t *testing.T) { 1688 v := TeamDiscussion{ 1689 Author: &User{}, 1690 Body: String(""), 1691 BodyHTML: String(""), 1692 BodyVersion: String(""), 1693 CommentsCount: Int(0), 1694 CommentsURL: String(""), 1695 CreatedAt: &Timestamp{}, 1696 LastEditedAt: &Timestamp{}, 1697 HTMLURL: String(""), 1698 NodeID: String(""), 1699 Number: Int(0), 1700 Pinned: Bool(false), 1701 Private: Bool(false), 1702 TeamURL: String(""), 1703 Title: String(""), 1704 UpdatedAt: &Timestamp{}, 1705 URL: String(""), 1706 Reactions: &Reactions{}, 1707 } 1708 want := `github.TeamDiscussion{Author:github.User{}, Body:"", BodyHTML:"", BodyVersion:"", CommentsCount:0, CommentsURL:"", CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, LastEditedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, HTMLURL:"", NodeID:"", Number:0, Pinned:false, Private:false, TeamURL:"", Title:"", UpdatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, URL:"", Reactions:github.Reactions{}}` 1709 if got := v.String(); got != want { 1710 t.Errorf("TeamDiscussion.String = %v, want %v", got, want) 1711 } 1712 } 1713 1714 func TestTeamLDAPMapping_String(t *testing.T) { 1715 v := TeamLDAPMapping{ 1716 ID: Int64(0), 1717 LDAPDN: String(""), 1718 URL: String(""), 1719 Name: String(""), 1720 Slug: String(""), 1721 Description: String(""), 1722 Privacy: String(""), 1723 Permission: String(""), 1724 MembersURL: String(""), 1725 RepositoriesURL: String(""), 1726 } 1727 want := `github.TeamLDAPMapping{ID:0, LDAPDN:"", URL:"", Name:"", Slug:"", Description:"", Privacy:"", Permission:"", MembersURL:"", RepositoriesURL:""}` 1728 if got := v.String(); got != want { 1729 t.Errorf("TeamLDAPMapping.String = %v, want %v", got, want) 1730 } 1731 } 1732 1733 func TestTextMatch_String(t *testing.T) { 1734 v := TextMatch{ 1735 ObjectURL: String(""), 1736 ObjectType: String(""), 1737 Property: String(""), 1738 Fragment: String(""), 1739 } 1740 want := `github.TextMatch{ObjectURL:"", ObjectType:"", Property:"", Fragment:""}` 1741 if got := v.String(); got != want { 1742 t.Errorf("TextMatch.String = %v, want %v", got, want) 1743 } 1744 } 1745 1746 func TestTree_String(t *testing.T) { 1747 v := Tree{ 1748 SHA: String(""), 1749 Truncated: Bool(false), 1750 } 1751 want := `github.Tree{SHA:"", Truncated:false}` 1752 if got := v.String(); got != want { 1753 t.Errorf("Tree.String = %v, want %v", got, want) 1754 } 1755 } 1756 1757 func TestTreeEntry_String(t *testing.T) { 1758 v := TreeEntry{ 1759 SHA: String(""), 1760 Path: String(""), 1761 Mode: String(""), 1762 Type: String(""), 1763 Size: Int(0), 1764 Content: String(""), 1765 URL: String(""), 1766 } 1767 want := `github.TreeEntry{SHA:"", Path:"", Mode:"", Type:"", Size:0, Content:"", URL:""}` 1768 if got := v.String(); got != want { 1769 t.Errorf("TreeEntry.String = %v, want %v", got, want) 1770 } 1771 } 1772 1773 func TestUser_String(t *testing.T) { 1774 v := User{ 1775 Login: String(""), 1776 ID: Int64(0), 1777 NodeID: String(""), 1778 AvatarURL: String(""), 1779 HTMLURL: String(""), 1780 GravatarID: String(""), 1781 Name: String(""), 1782 Company: String(""), 1783 Blog: String(""), 1784 Location: String(""), 1785 Email: String(""), 1786 Hireable: Bool(false), 1787 Bio: String(""), 1788 TwitterUsername: String(""), 1789 PublicRepos: Int(0), 1790 PublicGists: Int(0), 1791 Followers: Int(0), 1792 Following: Int(0), 1793 CreatedAt: &Timestamp{}, 1794 UpdatedAt: &Timestamp{}, 1795 SuspendedAt: &Timestamp{}, 1796 Type: String(""), 1797 SiteAdmin: Bool(false), 1798 TotalPrivateRepos: Int(0), 1799 OwnedPrivateRepos: Int(0), 1800 PrivateGists: Int(0), 1801 DiskUsage: Int(0), 1802 Collaborators: Int(0), 1803 TwoFactorAuthentication: Bool(false), 1804 Plan: &Plan{}, 1805 LdapDn: String(""), 1806 URL: String(""), 1807 EventsURL: String(""), 1808 FollowingURL: String(""), 1809 FollowersURL: String(""), 1810 GistsURL: String(""), 1811 OrganizationsURL: String(""), 1812 ReceivedEventsURL: String(""), 1813 ReposURL: String(""), 1814 StarredURL: String(""), 1815 SubscriptionsURL: String(""), 1816 } 1817 want := `github.User{Login:"", ID:0, NodeID:"", AvatarURL:"", HTMLURL:"", GravatarID:"", Name:"", Company:"", Blog:"", Location:"", Email:"", Hireable:false, Bio:"", TwitterUsername:"", PublicRepos:0, PublicGists:0, Followers:0, Following:0, CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, UpdatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, SuspendedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, Type:"", SiteAdmin:false, TotalPrivateRepos:0, OwnedPrivateRepos:0, PrivateGists:0, DiskUsage:0, Collaborators:0, TwoFactorAuthentication:false, Plan:github.Plan{}, LdapDn:"", URL:"", EventsURL:"", FollowingURL:"", FollowersURL:"", GistsURL:"", OrganizationsURL:"", ReceivedEventsURL:"", ReposURL:"", StarredURL:"", SubscriptionsURL:""}` 1818 if got := v.String(); got != want { 1819 t.Errorf("User.String = %v, want %v", got, want) 1820 } 1821 } 1822 1823 func TestUserLDAPMapping_String(t *testing.T) { 1824 v := UserLDAPMapping{ 1825 ID: Int64(0), 1826 LDAPDN: String(""), 1827 Login: String(""), 1828 AvatarURL: String(""), 1829 GravatarID: String(""), 1830 Type: String(""), 1831 SiteAdmin: Bool(false), 1832 URL: String(""), 1833 EventsURL: String(""), 1834 FollowingURL: String(""), 1835 FollowersURL: String(""), 1836 GistsURL: String(""), 1837 OrganizationsURL: String(""), 1838 ReceivedEventsURL: String(""), 1839 ReposURL: String(""), 1840 StarredURL: String(""), 1841 SubscriptionsURL: String(""), 1842 } 1843 want := `github.UserLDAPMapping{ID:0, LDAPDN:"", Login:"", AvatarURL:"", GravatarID:"", Type:"", SiteAdmin:false, URL:"", EventsURL:"", FollowingURL:"", FollowersURL:"", GistsURL:"", OrganizationsURL:"", ReceivedEventsURL:"", ReposURL:"", StarredURL:"", SubscriptionsURL:""}` 1844 if got := v.String(); got != want { 1845 t.Errorf("UserLDAPMapping.String = %v, want %v", got, want) 1846 } 1847 } 1848 1849 func TestUserMigration_String(t *testing.T) { 1850 v := UserMigration{ 1851 ID: Int64(0), 1852 GUID: String(""), 1853 State: String(""), 1854 LockRepositories: Bool(false), 1855 ExcludeAttachments: Bool(false), 1856 URL: String(""), 1857 CreatedAt: String(""), 1858 UpdatedAt: String(""), 1859 } 1860 want := `github.UserMigration{ID:0, GUID:"", State:"", LockRepositories:false, ExcludeAttachments:false, URL:"", CreatedAt:"", UpdatedAt:""}` 1861 if got := v.String(); got != want { 1862 t.Errorf("UserMigration.String = %v, want %v", got, want) 1863 } 1864 } 1865 1866 func TestUserStats_String(t *testing.T) { 1867 v := UserStats{ 1868 TotalUsers: Int(0), 1869 AdminUsers: Int(0), 1870 SuspendedUsers: Int(0), 1871 } 1872 want := `github.UserStats{TotalUsers:0, AdminUsers:0, SuspendedUsers:0}` 1873 if got := v.String(); got != want { 1874 t.Errorf("UserStats.String = %v, want %v", got, want) 1875 } 1876 } 1877 1878 func TestWebHookAuthor_String(t *testing.T) { 1879 v := WebHookAuthor{ 1880 Email: String(""), 1881 Name: String(""), 1882 Username: String(""), 1883 } 1884 want := `github.WebHookAuthor{Email:"", Name:"", Username:""}` 1885 if got := v.String(); got != want { 1886 t.Errorf("WebHookAuthor.String = %v, want %v", got, want) 1887 } 1888 } 1889 1890 func TestWebHookCommit_String(t *testing.T) { 1891 v := WebHookCommit{ 1892 Author: &WebHookAuthor{}, 1893 Committer: &WebHookAuthor{}, 1894 Distinct: Bool(false), 1895 ID: String(""), 1896 Message: String(""), 1897 } 1898 want := `github.WebHookCommit{Author:github.WebHookAuthor{}, Committer:github.WebHookAuthor{}, Distinct:false, ID:"", Message:""}` 1899 if got := v.String(); got != want { 1900 t.Errorf("WebHookCommit.String = %v, want %v", got, want) 1901 } 1902 } 1903 1904 func TestWebHookPayload_String(t *testing.T) { 1905 v := WebHookPayload{ 1906 Action: String(""), 1907 After: String(""), 1908 Before: String(""), 1909 Compare: String(""), 1910 Created: Bool(false), 1911 Deleted: Bool(false), 1912 Forced: Bool(false), 1913 HeadCommit: &WebHookCommit{}, 1914 Installation: &Installation{}, 1915 Organization: &Organization{}, 1916 Pusher: &User{}, 1917 Ref: String(""), 1918 Repo: &Repository{}, 1919 Sender: &User{}, 1920 } 1921 want := `github.WebHookPayload{Action:"", After:"", Before:"", Compare:"", Created:false, Deleted:false, Forced:false, HeadCommit:github.WebHookCommit{}, Installation:github.Installation{}, Organization:github.Organization{}, Pusher:github.User{}, Ref:"", Repo:github.Repository{}, Sender:github.User{}}` 1922 if got := v.String(); got != want { 1923 t.Errorf("WebHookPayload.String = %v, want %v", got, want) 1924 } 1925 } 1926 1927 func TestWeeklyCommitActivity_String(t *testing.T) { 1928 v := WeeklyCommitActivity{ 1929 Total: Int(0), 1930 Week: &Timestamp{}, 1931 } 1932 want := `github.WeeklyCommitActivity{Total:0, Week:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}}` 1933 if got := v.String(); got != want { 1934 t.Errorf("WeeklyCommitActivity.String = %v, want %v", got, want) 1935 } 1936 } 1937 1938 func TestWeeklyStats_String(t *testing.T) { 1939 v := WeeklyStats{ 1940 Week: &Timestamp{}, 1941 Additions: Int(0), 1942 Deletions: Int(0), 1943 Commits: Int(0), 1944 } 1945 want := `github.WeeklyStats{Week:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, Additions:0, Deletions:0, Commits:0}` 1946 if got := v.String(); got != want { 1947 t.Errorf("WeeklyStats.String = %v, want %v", got, want) 1948 } 1949 }