User bio
404 bio not found
Member since Jan 10, 2023
Posts:
Replies:
Cedric Montanuy · Sep 8, 2023 go to post

So I instantiated the class but it didn't work either
terminal :
 

unitTests.testSqlAgateInscription begins ...

TestMyMethod() begins ...

LogStateStatus:0:TestMyMethod:ERREUR #5002: Erreur Cache: <INVALID OREF>zTestMyMethod+4^unitTests.testSqlInscription.1 <<==== **FAILED**

unitTests:unitTests.testSqlInscription:TestMyMethod:

TestMyMethod failed

unitTests.testSqlInscription failed

unitTests failed
The code looks like that :
 

Class unitTests.testSqlInscription Extends %UnitTest.TestCase

{

Method TestMyMethod()

{

 set myObject = ##class(Package.BO.sqlInscription).%New()

 set myRequest = ##class(Package.Msg.getSomeDataFromDataBaseRequest).%New()

 set myRequest.somePropertyaboutEmail = "test@mail.com"

 do $$$AssertEquals(myObject.getSomeDataFromDataBase(myRequest),1953642, "Test MyMethod()=1953642")

}
}
I'm really out of ideas here to set up a basic unit test. Any hint is much welcome. 
Please and thank you. 
 

Cedric Montanuy · Sep 1, 2023 go to post

Ok i'll get going on instanciating the class first and see what it does.
The classMethod present a problem with the adapter method that i call.  
Thanks for your input.

Certifications & Credly badges:
Cedric has no Certifications & Credly badges yet.
Followers:
Cedric has no followers yet.
Following:
Cedric has not followed anybody yet.