Very basic JAXB test to ensure at least no hidden basic failures

Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/69d8b7b2
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/69d8b7b2
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/69d8b7b2

Branch: refs/heads/SYNCOPE-156
Commit: 69d8b7b21760e6129cdbafadcb4b628be03379b4
Parents: b8cadde
Author: Francesco Chicchiriccò <ilgro...@apache.org>
Authored: Thu Aug 20 11:58:25 2015 +0200
Committer: Francesco Chicchiriccò <ilgro...@apache.org>
Committed: Thu Aug 20 11:58:25 2015 +0200

----------------------------------------------------------------------
 .../org/apache/syncope/common/lib/JAXBTest.java | 42 ++++++++++++++++++++
 1 file changed, 42 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/69d8b7b2/common/lib/src/test/java/org/apache/syncope/common/lib/JAXBTest.java
----------------------------------------------------------------------
diff --git 
a/common/lib/src/test/java/org/apache/syncope/common/lib/JAXBTest.java 
b/common/lib/src/test/java/org/apache/syncope/common/lib/JAXBTest.java
new file mode 100644
index 0000000..bf8fcfb
--- /dev/null
+++ b/common/lib/src/test/java/org/apache/syncope/common/lib/JAXBTest.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.apache.syncope.common.lib;
+
+import static org.junit.Assert.fail;
+
+import java.io.StringWriter;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.Marshaller;
+import org.apache.syncope.common.lib.report.UserReportletConf;
+import org.apache.syncope.common.lib.to.UserTO;
+import org.junit.Test;
+
+public class JAXBTest {
+
+    @Test
+    public void marshal() {
+        try {
+            JAXBContext context = 
JAXBContext.newInstance(UserReportletConf.class);
+            Marshaller marshaller = context.createMarshaller();
+            marshaller.marshal(new UserTO(), new StringWriter());
+        } catch (Exception e) {
+            fail();
+        }
+    }
+}

Reply via email to