Committed by
Gerrit Code Review
Improve test coverage
Change-Id: If5b263f3b5a71463e93f1de2fc90edaef95df2b3
Showing
1 changed file
with
8 additions
and
0 deletions
... | @@ -18,6 +18,7 @@ package org.onosproject.store.resource.impl; | ... | @@ -18,6 +18,7 @@ package org.onosproject.store.resource.impl; |
18 | 18 | ||
19 | import com.google.common.collect.ImmutableSet; | 19 | import com.google.common.collect.ImmutableSet; |
20 | import org.junit.Test; | 20 | import org.junit.Test; |
21 | +import org.onlab.packet.VlanId; | ||
21 | import org.onosproject.net.DeviceId; | 22 | import org.onosproject.net.DeviceId; |
22 | import org.onosproject.net.resource.DiscreteResource; | 23 | import org.onosproject.net.resource.DiscreteResource; |
23 | import org.onosproject.net.resource.Resources; | 24 | import org.onosproject.net.resource.Resources; |
... | @@ -52,6 +53,13 @@ public class EmptyDiscreteResourcesTest { | ... | @@ -52,6 +53,13 @@ public class EmptyDiscreteResourcesTest { |
52 | } | 53 | } |
53 | 54 | ||
54 | @Test | 55 | @Test |
56 | + public void testValuesOf() { | ||
57 | + // doesn't match any types of resources | ||
58 | + assertThat(sut.valuesOf(Object.class), is(ImmutableSet.of())); | ||
59 | + assertThat(sut.valuesOf(VlanId.class), is(ImmutableSet.of())); | ||
60 | + } | ||
61 | + | ||
62 | + @Test | ||
55 | public void testContainsAny() { | 63 | public void testContainsAny() { |
56 | DiscreteResource res1 = Resources.discrete(DeviceId.deviceId("a")).resource(); | 64 | DiscreteResource res1 = Resources.discrete(DeviceId.deviceId("a")).resource(); |
57 | DiscreteResource res2 = Resources.discrete(DeviceId.deviceId("b")).resource(); | 65 | DiscreteResource res2 = Resources.discrete(DeviceId.deviceId("b")).resource(); | ... | ... |
-
Please register or login to post a comment