Skip to content

Commit

Permalink
LDEV-5185 - add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeloffner committed Dec 7, 2024
1 parent f04b1f0 commit 9f80e2a
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions test/tickets/LDEV5185.cfc
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
component extends="org.lucee.cfml.test.LuceeTestCase" skip="true" {


function run( testResults , testBox ) {
describe( title="Testcase for LDEV-5185", body = function() {

it(title = "Checking entrySet", body = function( currentSpec ) {
var map=createObject("java","java.util.HashMap");
map.put("susi","sorglos");
var it=map.entrySet().iterator();
while(it.hasNext()) {
var e=it.next();
expect(e.getKey()).toBe( "susi" );
expect(e.getValue()).toBe( "sorglos" );
}
});
it(title = "Checking keySet", body = function( currentSpec ) {
var map=createObject("java","java.util.HashMap");
map.put("susi","sorglos");
var it=map.keySet().iterator();
while(it.hasNext()) {
expect(it.next()).toBe( "susi" );
}
});
it(title = "Checking values", body = function( currentSpec ) {
var map=createObject("java","java.util.HashMap");
map.put("susi","sorglos");
var it=map.values().iterator();
while(it.hasNext()) {
expect(it.next()).toBe( "sorglos" );
}
});

});
}
}

0 comments on commit 9f80e2a

Please sign in to comment.