2 * Copyright (C) 2007-2012 Mathieu Baudier
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
16 package org
.argeo
.slc
.castor
;
18 import org
.argeo
.slc
.msg
.ObjectList
;
19 import org
.argeo
.slc
.msg
.build
.ModularDistributionDescriptor
;
21 public class ModularDistributionCastorTest
extends AbstractCastorTestCase
{
22 public void testModularDistributionDescriptor() throws Exception
{
23 ModularDistributionDescriptor mdd
= new ModularDistributionDescriptor();
25 mdd
.setVersion("0.1.0");
26 mdd
.getModulesDescriptors().put("eclipse",
27 "http://localhost/updateSite");
28 mdd
.getModulesDescriptors().put("modularDistribution",
29 "http://localhost/modularDistribution");
31 marshUnmarsh(mdd
, false);
34 public void testModularDistributionDescriptorList() throws Exception
{
35 ModularDistributionDescriptor mdd
= new ModularDistributionDescriptor();
37 mdd
.setVersion("0.1.0");
38 mdd
.getModulesDescriptors().put("eclipse",
39 "http://localhost/updateSite");
40 mdd
.getModulesDescriptors().put("modularDistribution",
41 "http://localhost/modularDistribution");
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");
51 ObjectList ol
= new ObjectList();
52 ol
.getObjects().add(mdd
);
53 ol
.getObjects().add(mdd2
);
55 marshUnmarsh(ol
, false);