Sha256: 54ceb0ec96887e35c77d911c82b72c4aff60a735aa28a814239ad5a398275559
Contents?: true
Size: 445 Bytes
Versions: 11
Compression:
Stored size: 445 Bytes
Contents
import ballerina/test; import ballerina/io; any[] outputs = []; int counter = 0; // This is the mock function which will replace the real function @test:Mock { packageName: "ballerina.io", functionName: "println" } public function mockPrint(any... s) { outputs[counter] = s[0]; counter++; } @test:Config function testFunc() { // Invoking the main function main(); test:assertEquals("Hello, World!", outputs[0]); }
Version data entries
11 entries across 11 versions & 1 rubygems