Last active
February 24, 2022 03:31
-
-
Save nvg/656f0882a2319b4061458faf0db6aa92 to your computer and use it in GitHub Desktop.
peoplecode: PSUnit base
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import TTS_UNITTEST:TestBase; | |
class Test extends TTS_UNITTEST:TestBase | |
method Test(); | |
method Run(); | |
method Setup(); | |
protected | |
private | |
instance string &someValue; | |
end-class; | |
Component string &messages; | |
method Test | |
%Super = create TTS_UNITTEST:TestBase("Test"); | |
&someValue = ""; | |
end-method; | |
method Setup | |
/+ Extends/implements TTS_UNITTEST:TestBase.Setup +/ | |
end-method; | |
method Run | |
/+ Extends/implements TTS_UNITTEST:TestBase.Run +/ | |
&messages = ""; | |
%This.Msg("Starting Run()"); | |
/* | |
Local Record &recSomeRecord = CreateRecord(Record.SOME_RECORD); | |
SQLExec("SELECT * FROM SOME_RECORD WHERE SOME_VALUE = :1", &someValue, &recSomeRecord); | |
Local Record &recSomeOtherRecord = CreateRecord(Record.SOME_OTHER_RECORD); | |
SQLExec("SELECT * FROM SOME_OTHER_RECORD WHERE SOME_VALUE = :1", &someValue, &recSomeOtherRecord); | |
%This.AssertStringsEqual(&someRec.GetField(Field.NAME).Value, &someOtherRec.GetField(Field.NAME).Value, "Names don't match!"); | |
*/ | |
%This.Msg("Finished Run()"); | |
end-method; |
Thank you for your interest, a copy should be available here: http://blog.psdev.ca/2017/09/psunit.html
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Do you have a copy of the original PSUnit project you can share? The original has been dropped from the Oracle website, and I haven't found anyplace else it's available online...