Package com.volantis.devrep.repository.impl.accessors

Examples of com.volantis.devrep.repository.impl.accessors.TestPolicyDescriptorAccessor


        HttpHeaders rHeaders = HttpServletFactory.
                getDefaultInstance().getHTTPHeaders(request);

        try {
            // Create simple accessor for use in the tests
            TestPolicyDescriptorAccessor accessor =
                    new TestPolicyDescriptorAccessor();
            PolicyTypeFactory policyTypeFactory =
                    PolicyTypeFactory.getDefaultInstance();
            accessor.addPolicyDescriptor(null, "policyname",
                                         policyTypeFactory.createTextPolicyType());

            // Create the factory
            PolicyValueFactory factory = PolicyValueFactory.createInstance(accessor);
View Full Code Here


     * exercise the simple value code.
     */
    public void testCreateSimplePolicyValue() throws Exception {

        // Create simple accessor for use in the tests
        TestPolicyDescriptorAccessor accessor =
                new TestPolicyDescriptorAccessor();
        accessor.addPolicyDescriptor(null, "policyname",
                new DefaultTextPolicyType());

        // Create a device to pass into the factory
        DefaultDevice device = new DefaultDevice(null, null, null) {
            public String getPolicyValue(String policy) {
View Full Code Here

     * simple value code.
     */
    public void testCreateSimplePolicyValueNull() throws Exception {

        // Create simple accessor for use in the tests
        TestPolicyDescriptorAccessor accessor =
                new TestPolicyDescriptorAccessor();
        accessor.addPolicyDescriptor(null, "policyname",
                new DefaultTextPolicyType());

        // Create a device to pass into the factory
        DefaultDevice device = new DefaultDevice(null, null, null) {
            public String getPolicyValue(String policy) {
View Full Code Here

     * exercise the composite value code.
     */
    public void testCreateCompositePolicyValue() throws Exception {

        // Create simple accessor for use in the tests
        TestPolicyDescriptorAccessor accessor =
                new TestPolicyDescriptorAccessor();
        accessor.addPolicyDescriptor(null, "policyname",
                new DefaultOrderedSetPolicyType(new DefaultTextPolicyType()));

        // Create a device to pass into the factory
        DefaultDevice device = new DefaultDevice(null, null, null) {
            public String getPolicyValue(String policy) {
View Full Code Here

        type.addFieldType("field3", intType);
        type.addFieldType("field4", intType);
        type.complete();

        // Create simple accessor for use in the tests
        TestPolicyDescriptorAccessor accessor =
                new TestPolicyDescriptorAccessor();
        accessor.addPolicyDescriptor(null, "policyname.field1", textType);
        accessor.addPolicyDescriptor(null, "policyname.field2", booleanType);
        accessor.addPolicyDescriptor(null, "policyname.field3", intType);
        accessor.addPolicyDescriptor(null, "policyname.field4", intType);
        accessor.addPolicyDescriptor(null, "policyname", type);

        // Create a device to pass into the factory
        final Map policies = new HashMap();
        policies.put("policyname.field1", "Some text");
        policies.put("policyname.field2", "true");
View Full Code Here

TOP

Related Classes of com.volantis.devrep.repository.impl.accessors.TestPolicyDescriptorAccessor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.