2572ffe397b6f55b788e334686e96dd679ad20f4
[groupbasedpolicy.git] / groupbasedpolicy / src / test / java / org / opendaylight / groupbasedpolicy / resolver / PolicyTest.java
1 package org.opendaylight.groupbasedpolicy.resolver;
2
3 import org.junit.Assert;
4 import org.junit.Before;
5 import org.junit.Test;
6 import org.opendaylight.groupbasedpolicy.dto.Policy;
7
8 public class PolicyTest {
9
10     private Policy policy;
11
12     @Before
13     public void initialisation() {
14         policy = new Policy(null);
15     }
16
17     @Test
18     public void equalsTest() {
19         Assert.assertTrue(policy.equals(policy));
20         Assert.assertFalse(policy.equals(null));
21         Assert.assertFalse(policy.equals(new Object()));
22
23         Policy other = new Policy(null);
24         Assert.assertTrue(policy.equals(other));
25     }
26
27     @Test
28     public void toStringTest() {
29         Assert.assertNotNull(policy.toString());
30     }
31 }