]> git.argeo.org Git - gpl/argeo-slc.git/blob - runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/ModularDistributionCastorTest.java
Introduce H
[gpl/argeo-slc.git] / runtime / org.argeo.slc.support.castor / src / test / java / org / argeo / slc / castor / ModularDistributionCastorTest.java
1 /*
2 * Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>
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
17 package org.argeo.slc.castor;
18
19 import org.argeo.slc.msg.ObjectList;
20 import org.argeo.slc.msg.build.ModularDistributionDescriptor;
21
22 public class ModularDistributionCastorTest extends AbstractCastorTestCase {
23 public void testModularDistributionDescriptor() throws Exception {
24 ModularDistributionDescriptor mdd = new ModularDistributionDescriptor();
25 mdd.setName("name");
26 mdd.setVersion("0.1.0");
27 mdd.getModulesDescriptors().put("eclipse",
28 "http://localhost/updateSite");
29 mdd.getModulesDescriptors().put("modularDistribution",
30 "http://localhost/modularDistribution");
31
32 marshUnmarsh(mdd, false);
33 }
34
35 public void testModularDistributionDescriptorList() throws Exception {
36 ModularDistributionDescriptor mdd = new ModularDistributionDescriptor();
37 mdd.setName("name");
38 mdd.setVersion("0.1.0");
39 mdd.getModulesDescriptors().put("eclipse",
40 "http://localhost/updateSite");
41 mdd.getModulesDescriptors().put("modularDistribution",
42 "http://localhost/modularDistribution");
43
44 ModularDistributionDescriptor mdd2 = new ModularDistributionDescriptor();
45 mdd2.setName("name2");
46 mdd2.setVersion("0.1.1");
47 mdd2.getModulesDescriptors().put("eclipse",
48 "http://localhost/updateSite2");
49 mdd2.getModulesDescriptors().put("modularDistribution",
50 "http://localhost/modularDistribution2");
51
52 ObjectList ol = new ObjectList();
53 ol.getObjects().add(mdd);
54 ol.getObjects().add(mdd2);
55
56 marshUnmarsh(ol, false);
57 }
58
59 }