[New] Added tests for inspector with HTTP request test
This commit is contained in:
parent
d155a8753b
commit
4a0a0d5001
29
pom.xml
29
pom.xml
|
@ -29,6 +29,21 @@
|
|||
<url>https://github.com/eitch/li.strolch.rest</url>
|
||||
</scm>
|
||||
|
||||
<properties>
|
||||
<jersey.version>2.5.1</jersey.version>
|
||||
</properties>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jersey</groupId>
|
||||
<artifactId>jersey-bom</artifactId>
|
||||
<version>${jersey.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
|
@ -49,18 +64,28 @@
|
|||
<groupId>org.glassfish.jersey.containers</groupId>
|
||||
<!-- if your container implements Servlet API older than 3.0, use "jersey-container-servlet-core" -->
|
||||
<artifactId>jersey-container-servlet</artifactId>
|
||||
<version>2.4.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jersey.media</groupId>
|
||||
<artifactId>jersey-media-moxy</artifactId>
|
||||
<version>2.4.1</version>
|
||||
</dependency>
|
||||
|
||||
<!-- test dependencies -->
|
||||
<dependency>
|
||||
<groupId>li.strolch</groupId>
|
||||
<artifactId>li.strolch.testbase</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sun.jersey</groupId>
|
||||
<artifactId>jersey-client</artifactId>
|
||||
<version>1.18</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jersey.containers</groupId>
|
||||
<artifactId>jersey-container-grizzly2-http</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
|
|
@ -71,25 +71,30 @@ public class Inspector {
|
|||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public Response getAgent() {
|
||||
|
||||
ComponentContainer container = AgentRef.getInstance().getContainer();
|
||||
Set<String> realmNames = container.getRealmNames();
|
||||
List<RealmOverview> realmOverviews = new ArrayList<>(realmNames.size());
|
||||
for (String realmName : realmNames) {
|
||||
try {
|
||||
ComponentContainer container = AgentRef.getInstance().getContainer();
|
||||
Set<String> realmNames = container.getRealmNames();
|
||||
List<RealmOverview> realmOverviews = new ArrayList<>(realmNames.size());
|
||||
for (String realmName : realmNames) {
|
||||
|
||||
StrolchRealm realm = container.getRealm(realmName);
|
||||
try (StrolchTransaction tx = realm.openTx()) {
|
||||
long size = 0;
|
||||
size += realm.getResourceMap().querySize(tx);
|
||||
size += realm.getOrderMap().querySize(tx);
|
||||
RealmOverview realmOverview = new RealmOverview(realmName, size);
|
||||
realmOverviews.add(realmOverview);
|
||||
StrolchRealm realm = container.getRealm(realmName);
|
||||
try (StrolchTransaction tx = realm.openTx()) {
|
||||
long size = 0;
|
||||
size += realm.getResourceMap().querySize(tx);
|
||||
size += realm.getOrderMap().querySize(tx);
|
||||
RealmOverview realmOverview = new RealmOverview(realmName, size);
|
||||
realmOverviews.add(realmOverview);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
AgentOverview agentOverview = new AgentOverview(realmOverviews);
|
||||
GenericEntity<AgentOverview> entity = new GenericEntity<AgentOverview>(agentOverview, AgentOverview.class) {
|
||||
};
|
||||
return Response.ok().entity(entity).build();
|
||||
AgentOverview agentOverview = new AgentOverview(realmOverviews);
|
||||
GenericEntity<AgentOverview> entity = new GenericEntity<AgentOverview>(agentOverview, AgentOverview.class) {
|
||||
};
|
||||
return Response.ok().entity(entity).build();
|
||||
} catch (Exception e) {
|
||||
//e.printStackTrace();
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
*/
|
||||
package li.strolch.rest.inspector;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
|
@ -23,17 +24,28 @@ import java.util.Set;
|
|||
*/
|
||||
public class StrolchRestfulClasses {
|
||||
|
||||
public static Set<Class<?>> classes;
|
||||
public static Set<Class<?>> restfulClasses;
|
||||
public static Set<Class<?>> providerClasses;
|
||||
|
||||
static {
|
||||
classes = new HashSet<>();
|
||||
classes.add(Inspector.class);
|
||||
Set<Class<?>> restfulClasses = new HashSet<>();
|
||||
restfulClasses.add(Inspector.class);
|
||||
|
||||
Set<Class<?>> providerClasses = new HashSet<>();
|
||||
providerClasses.add(StrolchRestfulExceptionMapper.class);
|
||||
|
||||
StrolchRestfulClasses.restfulClasses = Collections.unmodifiableSet(restfulClasses);
|
||||
StrolchRestfulClasses.providerClasses = Collections.unmodifiableSet(providerClasses);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the classes
|
||||
*/
|
||||
public static Set<Class<?>> getClasses() {
|
||||
return classes;
|
||||
public static Set<Class<?>> getRestfulClasses() {
|
||||
return restfulClasses;
|
||||
}
|
||||
|
||||
public static Set<Class<?>> getProviderClasses() {
|
||||
return providerClasses;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
package li.strolch.rest.inspector;
|
||||
|
||||
import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.ext.ExceptionMapper;
|
||||
import javax.ws.rs.ext.Provider;
|
||||
|
||||
import org.glassfish.grizzly.utils.Exceptions;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@Provider
|
||||
public class StrolchRestfulExceptionMapper implements ExceptionMapper<Exception> {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(StrolchRestfulExceptionMapper.class);
|
||||
|
||||
@Override
|
||||
public Response toResponse(Exception ex) {
|
||||
logger.error("Handling exception " + ex.getClass(), ex);
|
||||
return Response.status(500).entity(Exceptions.getStackTraceAsString(ex)).type("text/plain").build();
|
||||
}
|
||||
}
|
|
@ -54,4 +54,34 @@ public class AgentOverview {
|
|||
public void setRealms(List<RealmOverview> realms) {
|
||||
this.realms = realms;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((this.realms == null) ? 0 : this.realms.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
AgentOverview other = (AgentOverview) obj;
|
||||
if (this.realms == null) {
|
||||
if (other.realms != null)
|
||||
return false;
|
||||
} else if (!this.realms.equals(other.realms))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "AgentOverview [realms=" + this.realms + "]";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -72,4 +72,36 @@ public class RealmOverview {
|
|||
this.size = size;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((this.realmName == null) ? 0 : this.realmName.hashCode());
|
||||
result = prime * result + (int) (this.size ^ (this.size >>> 32));
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
RealmOverview other = (RealmOverview) obj;
|
||||
if (this.realmName == null) {
|
||||
if (other.realmName != null)
|
||||
return false;
|
||||
} else if (!this.realmName.equals(other.realmName))
|
||||
return false;
|
||||
if (this.size != other.size)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "RealmOverview [realmName=" + this.realmName + ", size=" + this.size + "]";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,79 @@
|
|||
/*
|
||||
* Copyright 2013 Robert von Burg <eitch@eitchnet.ch>
|
||||
*
|
||||
* Licensed 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 li.strolch.rest.inspector.test;
|
||||
|
||||
import java.io.File;
|
||||
import java.net.URI;
|
||||
|
||||
import li.strolch.rest.inspector.AgentRef;
|
||||
import li.strolch.rest.inspector.StrolchRestfulClasses;
|
||||
import li.strolch.rest.inspector.StrolchRestfulExceptionMapper;
|
||||
import li.strolch.service.api.ServiceHandler;
|
||||
import li.strolch.testbase.runtime.RuntimeMock;
|
||||
|
||||
import org.glassfish.grizzly.http.server.HttpServer;
|
||||
import org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpServerFactory;
|
||||
import org.glassfish.jersey.server.ResourceConfig;
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.BeforeClass;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
*/
|
||||
public abstract class AbstractRestfulTest {
|
||||
|
||||
protected static final String BASE_URI = "http://localhost:8080/tutorialwebapp";
|
||||
protected static final Logger logger = LoggerFactory.getLogger(AbstractRestfulTest.class);
|
||||
|
||||
private static final String RUNTIME_PATH = "target/withPrivilegeRuntime/"; //$NON-NLS-1$
|
||||
private static final String CONFIG_SRC = "src/test/resources/withPrivilegeRuntime"; //$NON-NLS-1$
|
||||
private static RuntimeMock runtimeMock;
|
||||
private static HttpServer httpServer;
|
||||
|
||||
@BeforeClass
|
||||
public static void beforeClass() {
|
||||
|
||||
File rootPath = new File(RUNTIME_PATH);
|
||||
File configSrc = new File(CONFIG_SRC);
|
||||
runtimeMock = new RuntimeMock();
|
||||
runtimeMock.mockRuntime(rootPath, configSrc);
|
||||
runtimeMock.startContainer(rootPath);
|
||||
|
||||
AgentRef.getInstance().init(runtimeMock.getAgent());
|
||||
|
||||
// create a resource config that scans for JAX-RS resources and providers
|
||||
// in com.example package
|
||||
final ResourceConfig rc = new ResourceConfig();
|
||||
for (Class<?> clazz : StrolchRestfulClasses.getRestfulClasses()) {
|
||||
rc.register(clazz);
|
||||
rc.register(StrolchRestfulExceptionMapper.class);
|
||||
}
|
||||
|
||||
httpServer = GrizzlyHttpServerFactory.createHttpServer(URI.create(BASE_URI), rc);
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
public static void afterClass() {
|
||||
httpServer.shutdownNow();
|
||||
runtimeMock.destroyRuntime();
|
||||
}
|
||||
|
||||
public static ServiceHandler getServiceHandler() {
|
||||
return runtimeMock.getContainer().getComponent(ServiceHandler.class);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,73 @@
|
|||
/*
|
||||
* Copyright 2013 Robert von Burg <eitch@eitchnet.ch>
|
||||
*
|
||||
* Licensed 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 li.strolch.rest.inspector.test;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.ws.rs.core.MediaType;
|
||||
|
||||
import li.strolch.rest.inspector.model.AgentOverview;
|
||||
import li.strolch.rest.inspector.model.RealmOverview;
|
||||
|
||||
import org.eclipse.persistence.jaxb.rs.MOXyJsonProvider;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.sun.jersey.api.client.Client;
|
||||
import com.sun.jersey.api.client.ClientResponse;
|
||||
import com.sun.jersey.api.client.GenericType;
|
||||
import com.sun.jersey.api.client.WebResource;
|
||||
import com.sun.jersey.api.client.config.ClientConfig;
|
||||
import com.sun.jersey.api.client.config.DefaultClientConfig;
|
||||
|
||||
/**
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
*/
|
||||
public class InspectorTest extends AbstractRestfulTest {
|
||||
|
||||
protected WebResource getResource() {
|
||||
ClientConfig cc = new DefaultClientConfig();
|
||||
cc.getClasses().add(MOXyJsonProvider.class);
|
||||
Client client = Client.create(cc);
|
||||
WebResource resource = client.resource(BASE_URI);
|
||||
return resource;
|
||||
}
|
||||
|
||||
protected ClientResponse getClientResponse(String path) {
|
||||
WebResource resource = getResource();
|
||||
ClientResponse response = resource.path(path).accept(MediaType.APPLICATION_JSON_TYPE).get(ClientResponse.class);
|
||||
return response;
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldGetAgent() {
|
||||
|
||||
// expected result
|
||||
List<RealmOverview> realms = new ArrayList<>(1);
|
||||
realms.add(new RealmOverview("defaultRealm", 4));
|
||||
AgentOverview expectedAgentOverview = new AgentOverview(realms);
|
||||
|
||||
// query
|
||||
ClientResponse response = getClientResponse("/strolch/inspector");
|
||||
AgentOverview agentOverview = response.getEntity(new GenericType<AgentOverview>() {
|
||||
});
|
||||
|
||||
// assertions
|
||||
assertEquals(expectedAgentOverview, agentOverview);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE log4j:configuration PUBLIC
|
||||
"-//APACHE//DTD LOG4J 1.2//EN" "http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/xml/doc-files/log4j.dtd">
|
||||
<log4j:configuration debug="false" xmlns:log4j='http://jakarta.apache.org/log4j/'>
|
||||
|
||||
<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
|
||||
<layout class="org.apache.log4j.PatternLayout">
|
||||
<param name="ConversionPattern" value="%d %5p [%t] %C{1} %M - %m%n" />
|
||||
</layout>
|
||||
</appender>
|
||||
<appender name="FILE" class="org.apache.log4j.FileAppender">
|
||||
<param name="File" value="sample.log"/>
|
||||
<param name="BufferedIO" value="true" />
|
||||
<param name="Append" value="true" />
|
||||
<layout class="org.apache.log4j.PatternLayout">
|
||||
<param name="ConversionPattern" value="%d %5p [%t] %C{1} %M - %m%n" />
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<logger name="ch.eitchnet">
|
||||
<level value="info" />
|
||||
</logger>
|
||||
|
||||
<root>
|
||||
<priority value="info" />
|
||||
<appender-ref ref="CONSOLE" />
|
||||
<!-- appender-ref ref="FILE" / -->
|
||||
</root>
|
||||
|
||||
</log4j:configuration>
|
|
@ -0,0 +1,30 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Privilege>
|
||||
|
||||
<Container>
|
||||
|
||||
<Parameters>
|
||||
<!-- parameters for the container itself -->
|
||||
<Parameter name="autoPersistOnPasswordChange" value="true" />
|
||||
</Parameters>
|
||||
|
||||
<EncryptionHandler class="ch.eitchnet.privilege.handler.DefaultEncryptionHandler">
|
||||
<Parameters>
|
||||
<Parameter name="hashAlgorithm" value="SHA-256" />
|
||||
</Parameters>
|
||||
</EncryptionHandler>
|
||||
|
||||
<PersistenceHandler class="ch.eitchnet.privilege.handler.XmlPersistenceHandler">
|
||||
<Parameters>
|
||||
<Parameter name="basePath" value="target/strolchRuntime/config" />
|
||||
<Parameter name="modelXmlFile" value="PrivilegeModel.xml" />
|
||||
</Parameters>
|
||||
</PersistenceHandler>
|
||||
|
||||
</Container>
|
||||
|
||||
<Policies>
|
||||
<Policy name="DefaultPrivilege" class="ch.eitchnet.privilege.policy.DefaultPrivilege" />
|
||||
</Policies>
|
||||
|
||||
</Privilege>
|
|
@ -0,0 +1,74 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<UsersAndRoles>
|
||||
|
||||
<Users>
|
||||
|
||||
<User userId="1" username="admin" password="8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918">
|
||||
<Firstname>Application</Firstname>
|
||||
<Surname>Administrator</Surname>
|
||||
<State>ENABLED</State>
|
||||
<Locale>en_GB</Locale>
|
||||
<Roles>
|
||||
<Role>PrivilegeAdmin</Role>
|
||||
<Role>AppUser</Role>
|
||||
</Roles>
|
||||
<Properties>
|
||||
<Property name="organization" value="eitchnet.ch" />
|
||||
<Property name="organizationalUnit" value="Development" />
|
||||
</Properties>
|
||||
</User>
|
||||
|
||||
<User userId="2" username="bob" password="81b637d8fcd2c6da6359e6963113a1170de795e4b725b84d1e0b4cfd9ec58ce9">
|
||||
<Firstname>Bob</Firstname>
|
||||
<Surname>Bernstein</Surname>
|
||||
<State>ENABLED</State>
|
||||
<Locale>en_GB</Locale>
|
||||
<Roles>
|
||||
<Role>AppUser</Role>
|
||||
</Roles>
|
||||
|
||||
</User>
|
||||
<User userId="3" username="jill" password="8cf37351b60f00084392043ce2e6256b96cea92949f90c7abce464cf164fbfa6">
|
||||
<Firstname>Jill</Firstname>
|
||||
<Surname>Johnson</Surname>
|
||||
<State>ENABLED</State>
|
||||
<Locale>en_GB</Locale>
|
||||
<Roles>
|
||||
<Role>OnlyGreetingServiceRole</Role>
|
||||
</Roles>
|
||||
|
||||
</User>
|
||||
<User userId="4" username="sysAdmin" password="8cffb494ef5ff3f74a571206e141d4fb84f833e431b98c8b3be43727c4cbddc1">
|
||||
<Firstname>System User</Firstname>
|
||||
<Surname>Administrator</Surname>
|
||||
<State>SYSTEM</State>
|
||||
<Locale>en_GB</Locale>
|
||||
<Roles>
|
||||
<Role>sysAdmin</Role>
|
||||
<Role>AppUser</Role>
|
||||
</Roles>
|
||||
|
||||
</User>
|
||||
</Users>
|
||||
|
||||
<Roles>
|
||||
|
||||
<Role name="PrivilegeAdmin" />
|
||||
|
||||
<Role name="AppUser">
|
||||
<Privilege name="li.strolch.service.api.Service" policy="DefaultPrivilege">
|
||||
<AllAllowed>true</AllAllowed>
|
||||
</Privilege>
|
||||
</Role>
|
||||
|
||||
<Role name="sysAdmin">
|
||||
</Role>
|
||||
|
||||
<Role name="OnlyGreetingServiceRole">
|
||||
<Privilege name="li.strolch.service.api.Service" policy="DefaultPrivilege">
|
||||
<Allow>li.strolch.service.test.GreetingService</Allow>
|
||||
</Privilege>
|
||||
</Role>
|
||||
|
||||
</Roles>
|
||||
</UsersAndRoles>
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<StrolchConfiguration>
|
||||
<Runtime>
|
||||
<applicationName>StrolchPersistenceTest</applicationName>
|
||||
<Properties>
|
||||
<dataStoreMode>TRANSIENT</dataStoreMode>
|
||||
<dataStoreFile>StrolchModel.xml</dataStoreFile>
|
||||
<verbose>true</verbose>
|
||||
</Properties>
|
||||
</Runtime>
|
||||
<Component>
|
||||
<name>ServiceHandler</name>
|
||||
<api>li.strolch.service.api.ServiceHandler</api>
|
||||
<impl>li.strolch.service.api.DefaultServiceHandler</impl>
|
||||
<Properties>
|
||||
<verbose>true</verbose>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component>
|
||||
<name>PrivilegeHandler</name>
|
||||
<api>li.strolch.runtime.privilege.StrolchPrivilegeHandler</api>
|
||||
<impl>li.strolch.runtime.privilege.DefaultStrolchPrivilegeHandler</impl>
|
||||
<Properties>
|
||||
<privilegeConfigFile>PrivilegeConfig.xml</privilegeConfigFile>
|
||||
</Properties>
|
||||
</Component>
|
||||
</StrolchConfiguration>
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<StrolchModel>
|
||||
<Order Id="MyTestOrder" Name="Test Name" Type="TestType" Date="2013-11-20T07:42:57.699+01:00" State="CREATED">
|
||||
<ParameterBag Id="@bag01" Name="Test Bag" Type="TestBag">
|
||||
<Parameter Id="@param7" Name="StringList Param" Type="StringList" Value="Hello;World" />
|
||||
<Parameter Id="@param6" Name="Date Param" Type="Date" Value="2012-11-30T18:12:05.628+01:00" />
|
||||
<Parameter Id="@param5" Name="String Param" Type="String" Value="Strolch" />
|
||||
<Parameter Id="@param4" Name="Long Param" Type="Long" Value="4453234566" />
|
||||
<Parameter Id="@param3" Name="Integer Param" Type="Integer" Value="77" />
|
||||
<Parameter Id="@param2" Name="Float Param" Type="Float" Value="44.3" />
|
||||
<Parameter Id="@param1" Name="Boolean Param" Type="Boolean" Value="true" />
|
||||
</ParameterBag>
|
||||
</Order>
|
||||
</StrolchModel>
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<StrolchModel>
|
||||
<Resource Id="MyTestResource" Name="Test Name" Type="TestType">
|
||||
<ParameterBag Id="@bag01" Name="Test Bag" Type="TestBag">
|
||||
<Parameter Id="@param7" Name="StringList Param" Type="StringList" Value="Hello;World" />
|
||||
<Parameter Id="@param6" Name="Date Param" Type="Date" Value="2012-11-30T18:12:05.628+01:00" />
|
||||
<Parameter Id="@param5" Name="String Param" Type="String" Value="Strolch" />
|
||||
<Parameter Id="@param4" Name="Long Param" Type="Long" Value="4453234566" />
|
||||
<Parameter Id="@param3" Name="Integer Param" Type="Integer" Value="77" />
|
||||
<Parameter Id="@param2" Name="Float Param" Type="Float" Value="44.3" />
|
||||
<Parameter Id="@param1" Name="Boolean Param" Type="Boolean" Value="true" />
|
||||
</ParameterBag>
|
||||
</Resource>
|
||||
</StrolchModel>
|
|
@ -0,0 +1,29 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<StrolchModel>
|
||||
<Resource Id="TestType" Name="TestType Template" Type="Template">
|
||||
<ParameterBag Id="@bag01" Name="Test Bag" Type="TestBag">
|
||||
<Parameter Id="@param7" Name="StringList Param" Type="StringList" Value="Hello;World" />
|
||||
<Parameter Id="@param6" Name="Date Param" Type="Date" Value="2012-11-30T18:12:05.628+01:00" />
|
||||
<Parameter Id="@param5" Name="String Param" Type="String" Value="Strolch" />
|
||||
<Parameter Id="@param4" Name="Long Param" Type="Long" Value="4453234566" />
|
||||
<Parameter Id="@param3" Name="Integer Param" Type="Integer" Value="77" />
|
||||
<Parameter Id="@param2" Name="Float Param" Type="Float" Value="44.3" />
|
||||
<Parameter Id="@param1" Name="Boolean Param" Type="Boolean" Value="true" />
|
||||
</ParameterBag>
|
||||
</Resource>
|
||||
<Order Id="Template" Name="MyTestOrder Template" Type="MyTestOrder">
|
||||
<ParameterBag Id="@bag01" Name="Test Bag" Type="TestBag">
|
||||
<Parameter Id="@param7" Name="StringList Param" Type="StringList" Value="Hello;World" />
|
||||
<Parameter Id="@param6" Name="Date Param" Type="Date" Value="2012-11-30T18:12:05.628+01:00" />
|
||||
<Parameter Id="@param5" Name="String Param" Type="String" Value="Strolch" />
|
||||
<Parameter Id="@param4" Name="Long Param" Type="Long" Value="4453234566" />
|
||||
<Parameter Id="@param3" Name="Integer Param" Type="Integer" Value="77" />
|
||||
<Parameter Id="@param2" Name="Float Param" Type="Float" Value="44.3" />
|
||||
<Parameter Id="@param1" Name="Boolean Param" Type="Boolean" Value="true" />
|
||||
</ParameterBag>
|
||||
</Order>
|
||||
|
||||
<IncludeFile file="Resources.xml" />
|
||||
<IncludeFile file="Orders.xml" />
|
||||
|
||||
</StrolchModel>
|
Loading…
Reference in New Issue