We want to add VdfUnit as a library, by adding it as a Mercurial subrepository. We solve this by adding both the Order Entry and the VdfUnit repositories as subrepos under a new “super” repo. Selecting the parent folder (Automated Testing), we right click, select TortoiseHg, and Create Repository Here.
Inside this folder, right click again, and select TortoiseHg and Clone. In Source, we paste the BitBucket URL: “https://bitbucket.org/olaeld/vdfunit”. Then we press the “Clone” button. This will clone the repo from BitBucket.
Now, we need to tell the Automated Testing repo that it has to use two subrepos. We create a file named .hgsub, and add two lines
Order Entry = Order Entry
vdfunit = vdfunit
Opening the Commit view in TortoiseHg, and refreshing it, allows us to “Add” .hgsub. This will bring up our two subrepos, and we can commit the changes.
In DataFlex Studio, we can select Maintain Libraries from the Tools menu, and select the appropriate VDFUnit workspace.
You’re now ready to select File -> New Project -> VDFUnit TestRunner Project, and start writing unit tests!