Add INFO.yaml for nemo
[nemo.git] / nemo-impl / src / test / java / org / opendaylight / nemo / intent / IntentResolutionExceptionTest.java
1 /*
2  * Copyright (c) 2015 Huawei, 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.nemo.intent;
9
10 import org.junit.Assert;
11 import org.junit.Before;
12 import org.junit.Test;
13
14 /**
15  * Created by zhangmeng on 2015/11/10.
16  */
17 public class IntentResolutionExceptionTest{
18     private IntentResolutionException intentResolutionException1;
19     private IntentResolutionException intentResolutionException2;
20     private IntentResolutionException intentResolutionException3;
21     private IntentResolutionException intentResolutionException4;
22     private IntentResolutionException intentResolutionException5;
23
24     private String message;
25     private Throwable cause;
26     private boolean enableSuppression;
27     private boolean writableStackTrace;
28     @Before
29     public void setUp() throws Exception {
30         message = new String();
31         cause = new Throwable();
32         enableSuppression = true;
33         writableStackTrace = true;
34     }
35
36     @Test
37     public void Construction()throws Exception{
38         Assert.assertNull(intentResolutionException1);
39         Assert.assertNull(intentResolutionException2);
40         Assert.assertNull(intentResolutionException3);
41         Assert.assertNull(intentResolutionException4);
42         Assert.assertNull(intentResolutionException5);
43
44         intentResolutionException1 = new IntentResolutionException();
45         intentResolutionException2 = new IntentResolutionException(message);
46         intentResolutionException3 = new IntentResolutionException(cause);
47         intentResolutionException4 = new IntentResolutionException(message,cause);
48         intentResolutionException5 = new IntentResolutionException(message,cause,enableSuppression,writableStackTrace);
49
50         Assert.assertNotNull(intentResolutionException1);
51         Assert.assertNotNull(intentResolutionException2);
52         Assert.assertNotNull(intentResolutionException3);
53         Assert.assertNotNull(intentResolutionException4);
54         Assert.assertNotNull(intentResolutionException5);
55     }
56
57 }