2 * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.mdsal.binding.model.ri.generated.type.builder;
10 import static org.junit.Assert.assertEquals;
11 import static org.junit.Assert.assertNotNull;
12 import static org.junit.Assert.assertTrue;
14 import org.junit.Test;
15 import org.opendaylight.mdsal.binding.model.api.AccessModifier;
16 import org.opendaylight.mdsal.binding.model.api.GeneratedProperty;
17 import org.opendaylight.mdsal.binding.model.api.TypeMemberComment;
19 public class GeneratedPropertyTest {
22 public void testMethodsForGeneratedPropertyBuilderImpl() {
23 final GeneratedPropertyBuilderImpl propertyBuilderImpl = new GeneratedPropertyBuilderImpl("testProperty");
25 propertyBuilderImpl.setValue("new value");
26 propertyBuilderImpl.setReadOnly(true);
28 final GeneratedProperty genProperty = propertyBuilderImpl.toInstance();
29 assertNotNull(genProperty);
31 assertNotNull(propertyBuilderImpl.toString());
35 public void testMethodsForGeneratedPropertyImpl() {
36 final GeneratedPropertyImpl propertyImpl = new GeneratedPropertyImpl("Test", null,
37 TypeMemberComment.contractOf("test property"), AccessModifier.PRIVATE, null, true, true, true,
40 assertEquals("test value", propertyImpl.getValue());
41 assertTrue(propertyImpl.isReadOnly());
42 assertNotNull(propertyImpl.toString());