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