2 * Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>
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.
17 package org
.argeo
.slc
.castor
;
19 import org
.argeo
.slc
.msg
.ObjectList
;
20 import org
.argeo
.slc
.msg
.build
.ModularDistributionDescriptor
;
22 public class ModularDistributionCastorTest
extends AbstractCastorTestCase
{
23 public void testModularDistributionDescriptor() throws Exception
{
24 ModularDistributionDescriptor mdd
= new ModularDistributionDescriptor();
26 mdd
.setVersion("0.1.0");
27 mdd
.getModulesDescriptors().put("eclipse",
28 "http://localhost/updateSite");
29 mdd
.getModulesDescriptors().put("modularDistribution",
30 "http://localhost/modularDistribution");
32 marshUnmarsh(mdd
, false);
35 public void testModularDistributionDescriptorList() throws Exception
{
36 ModularDistributionDescriptor mdd
= new ModularDistributionDescriptor();
38 mdd
.setVersion("0.1.0");
39 mdd
.getModulesDescriptors().put("eclipse",
40 "http://localhost/updateSite");
41 mdd
.getModulesDescriptors().put("modularDistribution",
42 "http://localhost/modularDistribution");
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");
52 ObjectList ol
= new ObjectList();
53 ol
.getObjects().add(mdd
);
54 ol
.getObjects().add(mdd2
);
56 marshUnmarsh(ol
, false);