@@ -654,6 +654,45 @@ func TestDefaultApiService_CreateBranch(t *testing.T) {
654654}
655655
656656func TestDefaultApiService_CreateComment (t * testing.T ) {
657+ type fields struct {
658+ client * APIClient
659+ }
660+ type args struct {
661+ projectKey string
662+ repositorySlug string
663+ commitId string
664+ localVarOptionals map [string ]interface {}
665+ }
666+ tests := []struct {
667+ name string
668+ fields fields
669+ args args
670+ want * APIResponse
671+ wantErr , integrationTest bool
672+ }{
673+ {"networkErrorContextExceeded" , fields {client : generateConfigFake ()}, args {}, & APIResponse {Message : "Post https://stash.domain.com/rest/api/1.0/projects//repos//commits//comments: context canceled" }, true , false },
674+ }
675+ for _ , tt := range tests {
676+ if tt .integrationTest != runIntegrationTests {
677+ continue
678+ }
679+ t .Run (tt .name , func (t * testing.T ) {
680+ a := & DefaultApiService {
681+ client : tt .fields .client ,
682+ }
683+ got , err := a .CreateComment (tt .args .projectKey , tt .args .repositorySlug , tt .args .commitId , tt .args .localVarOptionals )
684+ if (err != nil ) != tt .wantErr {
685+ t .Errorf ("DefaultApiService.CreateComment() error = %v, wantErr %v" , err , tt .wantErr )
686+ return
687+ }
688+ if ! reflect .DeepEqual (got , tt .want ) {
689+ t .Errorf ("DefaultApiService.CreateComment() = %v, want %v" , got , tt .want )
690+ }
691+ })
692+ }
693+ }
694+
695+ func TestDefaultApiService_CreateCommentWithComment (t * testing.T ) {
657696 type fields struct {
658697 client * APIClient
659698 }
@@ -700,16 +739,16 @@ func TestDefaultApiService_CreateComment(t *testing.T) {
700739 a := & DefaultApiService {
701740 client : tt .fields .client ,
702741 }
703- got , err := a .CreateComment (tt .args .projectKey , tt .args .repositorySlug , tt .args .commitId , tt .args .comment , tt .args .localVarOptionals )
742+ got , err := a .CreateCommentWithComment (tt .args .projectKey , tt .args .repositorySlug , tt .args .commitId , tt .args .comment , tt .args .localVarOptionals )
704743 if (err != nil ) != tt .wantErr {
705- t .Errorf ("DefaultApiService.CreateComment () error = %v, wantErr %v" , err , tt .wantErr )
744+ t .Errorf ("DefaultApiService.CreateCommentWithComment () error = %v, wantErr %v" , err , tt .wantErr )
706745 return
707746 }
708747 if got != nil {
709748 got .Response = nil
710749 }
711750 if ! reflect .DeepEqual (got , tt .want ) {
712- t .Errorf ("DefaultApiService.CreateComment () = %v, want %v" , got , tt .want )
751+ t .Errorf ("DefaultApiService.CreateCommentWithComment () = %v, want %v" , got , tt .want )
713752 }
714753 })
715754 }
0 commit comments