Skip to content
Snippets Groups Projects
Commit e35c4941 authored by felmer's avatar felmer
Browse files

SSDM-3284: V3ApiDtoTestService: improved logging and handle long and boolean...

SSDM-3284: V3ApiDtoTestService: improved logging and handle long and boolean primitives. test-dto-roundtrip: improve logging

SVN: 35896
parent 47a2cd6c
No related branches found
No related tags found
No related merge requests found
......@@ -49,7 +49,7 @@ define(['jquery', 'underscore', 'openbis', 'test/common'], function($, _, openbi
var dtos = Array.prototype.slice.call(arguments);
var roundtrips = _.map(dtos, function(dto){
c.ok("Testing " + dto['@type']);
c.ok("======== Testing " + dto['@type']);
c.ok('Rountrip ok.');
var proto = require(dto['@type'].replace(/\./g, '/'));
......@@ -74,6 +74,7 @@ define(['jquery', 'underscore', 'openbis', 'test/common'], function($, _, openbi
if (setter) {
subj[setter](val);
c.ok("FIELD: " + key + " = >" + val + "<")
} else {
c.ok("Skipping field " + key + " that has no setter.");
}
......
......@@ -85,14 +85,14 @@ public class V3ApiDtoTestService implements ICustomASServiceExecutor
return new Date(rnd);
}
if (type == Long.class) {
if (type == Long.class || type == Long.TYPE) {
return rnd;
}
if (type == Boolean.class) {
if (type == Boolean.class || type == Boolean.TYPE) {
return random < 0.5;
}
System.out.println("Complex type: " + type.getName());
return null;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment