Package org.openengsb.core.api.descriptor.AttributeDefinition

Examples of org.openengsb.core.api.descriptor.AttributeDefinition.Option


        Builder builder = AttributeDefinition.builder(mock);
        builder.name("ONE").id("123");
        MethodUtil.addEnumValues(TestEnum.class, builder);
        AttributeDefinition build = builder.build();
        List<Option> options = build.getOptions();
        Option option0 = options.get(0);
        assertThat(option0.getLabel().getString(Locale.getDefault()), equalTo(TestEnum.ONE.toString()));
        assertThat(option0.getValue().toString(), equalTo(TestEnum.ONE.toString()));
        Option option1 = options.get(1);
        assertThat(option1.getLabel().getString(Locale.getDefault()), equalTo(TestEnum.ONE.toString()));
        assertThat(option1.getValue().toString(), equalTo(TestEnum.TWO.toString()));
    }
View Full Code Here

TOP

Related Classes of org.openengsb.core.api.descriptor.AttributeDefinition.Option

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.