1
0
mirror of https://github.com/ManyakRus/crud_generator.git synced 2024-11-24 08:22:42 +02:00

сделал model_crud.go_

This commit is contained in:
Nikitin Aleksandr 2023-11-09 16:43:45 +03:00
parent 77991aad91
commit 7cb07d4d5a
3 changed files with 15 additions and 3 deletions

View File

@ -164,14 +164,18 @@ func Test_server_LawsuitStatusType_FindByExtID(t *testing.T) {
server1 := &ServerGRPC{}
Otvet1, err := server1.LawsuitStatusType_Read(ctx, &Request)
if err != nil {
t.Error("Test_server_LawsuitStatusType_FindByExtId() error: ", err)
t.Error("Test_server_LawsuitStatusType_FindByExtID() error: ", err)
}
// получим модель из строки JSON
Model := lawsuit_status_types.LawsuitStatusType{}
err = Model.GetModelFromJSON(Otvet1.ModelString)
if err != nil {
t.Error("Test_server_LawsuitStatusType_FindByExtId() GetModelFromJSON() error: ", err)
t.Error("Test_server_LawsuitStatusType_FindByExtID() GetModelFromJSON() error: ", err)
}
if Model.ExtID == 0 {
return
}
@ -181,7 +185,7 @@ func Test_server_LawsuitStatusType_FindByExtID(t *testing.T) {
RequestExtId.ConnectionId = Model.ConnectionID
RequestExtId.VersionModel = lawsuit_status_types.LawsuitStatusType{}.GetStructVersion()
Otvet, err := server1.LawsuitStatusType_FindByExtId(ctx, &RequestExtId)
Otvet, err := server1.LawsuitStatusType_FindByExtID(ctx, &RequestExtId)
if err != nil {
t.Error("Test_server_LawsuitStatusType_FindByExtId() error: ", err)
}

View File

@ -165,6 +165,10 @@ func TestFindByExtID(t *testing.T) {
t.Error("TestFind_ByExtID() error: ", err)
}
if Otvet1.ExtID == 0 {
return
}
Otvet := lawsuit_status_types.LawsuitStatusType{}
Otvet.ExtID = Otvet1.ExtID
Otvet.ConnectionID = Otvet1.ConnectionID

View File

@ -165,6 +165,10 @@ func TestFindByExtID(t *testing.T) {
t.Error("TestFind_ByExtID() error: ", err)
}
if Otvet1.ExtID == 0 {
return
}
Otvet := lawsuit_status_types.LawsuitStatusType{}
Otvet.ExtID = Otvet1.ExtID
Otvet.ConnectionID = Otvet1.ConnectionID