X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=runtime%2Forg.argeo.slc.support.castor%2Fsrc%2Ftest%2Fjava%2Forg%2Fargeo%2Fslc%2Fcastor%2FAbstractCastorTestCase.java;h=27b7863468ebdf2f6c3dd7e34c88ef9348ca498e;hb=1fdb1b4e7b1d2b0cabb6483238301b857a6392fa;hp=346fc859fcd590ac131a9685cd746d96aeed036d;hpb=1ec5ffef6e38d7804de444391447320ba5a6dded;p=gpl%2Fargeo-slc.git diff --git a/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/AbstractCastorTestCase.java b/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/AbstractCastorTestCase.java index 346fc859f..27b786346 100644 --- a/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/AbstractCastorTestCase.java +++ b/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/AbstractCastorTestCase.java @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2010 Mathieu Baudier + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.argeo.slc.castor; import org.apache.commons.logging.Log; @@ -35,7 +51,7 @@ public abstract class AbstractCastorTestCase extends AbstractSpringTestCase { StringResult xml = new StringResult(); marshaller.marshal(obj, xml); - log.info("Marshalled ResultPart Request: " + xml); + log.info("Marshalled " + obj.getClass() + ": " + xml + "\n"); if (validate) UnitXmlUtils.assertXmlValidation(getBean(XmlValidator.class), @@ -54,7 +70,8 @@ public abstract class AbstractCastorTestCase extends AbstractSpringTestCase { return (T) unmarshal(xml); } + @SuppressWarnings("unchecked") protected T marshUnmarsh(Object obj) throws Exception { - return marshUnmarsh(obj, true); + return (T) marshUnmarsh(obj, true); } }