From e35c494114bfb09aa1664186567fc873411bcb61 Mon Sep 17 00:00:00 2001 From: felmer <felmer> Date: Tue, 15 Mar 2016 09:37:39 +0000 Subject: [PATCH] SSDM-3284: V3ApiDtoTestService: improved logging and handle long and boolean primitives. test-dto-roundtrip: improve logging SVN: 35896 --- .../openbis-v3-api-test/html/test/test-dto-roundtrip.js | 3 ++- .../cisd/openbis/jstest/service/V3ApiDtoTestService.java | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-dto-roundtrip.js b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-dto-roundtrip.js index 38786ebb264..420c3d6a89e 100644 --- a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-dto-roundtrip.js +++ b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-dto-roundtrip.js @@ -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."); } diff --git a/js-test/source/java/ch/systemsx/cisd/openbis/jstest/service/V3ApiDtoTestService.java b/js-test/source/java/ch/systemsx/cisd/openbis/jstest/service/V3ApiDtoTestService.java index 1eae21d8b69..079966a640a 100644 --- a/js-test/source/java/ch/systemsx/cisd/openbis/jstest/service/V3ApiDtoTestService.java +++ b/js-test/source/java/ch/systemsx/cisd/openbis/jstest/service/V3ApiDtoTestService.java @@ -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; } -- GitLab