Generate @param for RPC invocation methods
[mdsal.git] / binding / mdsal-binding-generator-util / src / test / java / org / opendaylight / mdsal / binding / model / util / generated / type / builder / GeneratedPropertyTest.java
1 /*
2  * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.mdsal.binding.model.util.generated.type.builder;
9
10 import static org.junit.Assert.assertEquals;
11 import static org.junit.Assert.assertNotNull;
12 import static org.junit.Assert.assertTrue;
13
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;
18
19 public class GeneratedPropertyTest {
20
21     @Test
22     public void testMethodsForGeneratedPropertyBuilderImpl() {
23         final GeneratedPropertyBuilderImpl propertyBuilderImpl = new GeneratedPropertyBuilderImpl("testProperty");
24
25         propertyBuilderImpl.setValue("new value");
26         propertyBuilderImpl.setReadOnly(true);
27
28         final GeneratedProperty genProperty = propertyBuilderImpl.toInstance(null);
29         assertNotNull(genProperty);
30
31         assertNotNull(propertyBuilderImpl.toString());
32     }
33
34     @Test
35     public void testMethodsForGeneratedPropertyImpl() {
36         final GeneratedPropertyImpl propertyImpl = new GeneratedPropertyImpl(null, "Test", null,
37             TypeMemberComment.contractOf("test property"), AccessModifier.PRIVATE, null, true, true, true,
38             "test value");
39
40         assertEquals("test value", propertyImpl.getValue());
41         assertTrue(propertyImpl.isReadOnly());
42         assertNotNull(propertyImpl.toString());
43     }
44 }