]> git.argeo.org Git - gpl/argeo-slc.git/blob - legacy/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/ModularDistributionCastorTest.java
Move to SLC legacy
[gpl/argeo-slc.git] / legacy / runtime / org.argeo.slc.support.castor / src / test / java / org / argeo / slc / castor / ModularDistributionCastorTest.java
1 /*
2 * Copyright (C) 2007-2012 Mathieu Baudier
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 package org.argeo.slc.castor;
17
18 import org.argeo.slc.msg.ObjectList;
19 import org.argeo.slc.msg.build.ModularDistributionDescriptor;
20
21 public class ModularDistributionCastorTest extends AbstractCastorTestCase {
22 public void testModularDistributionDescriptor() throws Exception {
23 ModularDistributionDescriptor mdd = new ModularDistributionDescriptor();
24 mdd.setName("name");
25 mdd.setVersion("0.1.0");
26 mdd.getModulesDescriptors().put("eclipse",
27 "http://localhost/updateSite");
28 mdd.getModulesDescriptors().put("modularDistribution",
29 "http://localhost/modularDistribution");
30
31 marshUnmarsh(mdd, false);
32 }
33
34 public void testModularDistributionDescriptorList() throws Exception {
35 ModularDistributionDescriptor mdd = new ModularDistributionDescriptor();
36 mdd.setName("name");
37 mdd.setVersion("0.1.0");
38 mdd.getModulesDescriptors().put("eclipse",
39 "http://localhost/updateSite");
40 mdd.getModulesDescriptors().put("modularDistribution",
41 "http://localhost/modularDistribution");
42
43 ModularDistributionDescriptor mdd2 = new ModularDistributionDescriptor();
44 mdd2.setName("name2");
45 mdd2.setVersion("0.1.1");
46 mdd2.getModulesDescriptors().put("eclipse",
47 "http://localhost/updateSite2");
48 mdd2.getModulesDescriptors().put("modularDistribution",
49 "http://localhost/modularDistribution2");
50
51 ObjectList ol = new ObjectList();
52 ol.getObjects().add(mdd);
53 ol.getObjects().add(mdd2);
54
55 marshUnmarsh(ol, false);
56 }
57
58 }