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.generator.util.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;
18 public class GeneratedPropertyTest {
21 public void testMethodsForGeneratedPropertyBuilderImpl() {
22 final GeneratedPropertyBuilderImpl propertyBuilderImpl = new GeneratedPropertyBuilderImpl("testProperty");
24 propertyBuilderImpl.setValue("new value");
25 propertyBuilderImpl.setReadOnly(true);
27 final GeneratedProperty genProperty = propertyBuilderImpl.toInstance(null);
28 assertNotNull(genProperty);
30 assertNotNull(propertyBuilderImpl.toString());
34 public void testMethodsForGeneratedPropertyImpl() {
35 final GeneratedPropertyImpl propertyImpl = new GeneratedPropertyImpl(null, "Test", null, "test property", AccessModifier.PRIVATE, null, true, true, true, "test value");
37 assertEquals("test value", propertyImpl.getValue());
38 assertTrue(propertyImpl.isReadOnly());
39 assertNotNull(propertyImpl.toString());