Committed by
Gerrit Code Review
Remove unnecessary non-null check assertions
Private methods need to ensure to return a non-null value Change-Id: Ie1fffc52282660c4d32c8fbedd9f47049b2e74ae
Showing
1 changed file
with
0 additions
and
5 deletions
... | @@ -33,7 +33,6 @@ import org.onosproject.net.intent.PointToPointIntent; | ... | @@ -33,7 +33,6 @@ import org.onosproject.net.intent.PointToPointIntent; |
33 | import java.util.List; | 33 | import java.util.List; |
34 | 34 | ||
35 | import static org.hamcrest.CoreMatchers.instanceOf; | 35 | import static org.hamcrest.CoreMatchers.instanceOf; |
36 | -import static org.hamcrest.CoreMatchers.notNullValue; | ||
37 | import static org.hamcrest.MatcherAssert.assertThat; | 36 | import static org.hamcrest.MatcherAssert.assertThat; |
38 | import static org.hamcrest.Matchers.hasSize; | 37 | import static org.hamcrest.Matchers.hasSize; |
39 | import static org.hamcrest.Matchers.is; | 38 | import static org.hamcrest.Matchers.is; |
... | @@ -89,11 +88,9 @@ public class PointToPointIntentCompilerTest extends AbstractIntentTest { | ... | @@ -89,11 +88,9 @@ public class PointToPointIntentCompilerTest extends AbstractIntentTest { |
89 | public void testForwardPathCompilation() { | 88 | public void testForwardPathCompilation() { |
90 | 89 | ||
91 | PointToPointIntent intent = makeIntent("d1", "d8"); | 90 | PointToPointIntent intent = makeIntent("d1", "d8"); |
92 | - assertThat(intent, is(notNullValue())); | ||
93 | 91 | ||
94 | String[] hops = {"d1", "d2", "d3", "d4", "d5", "d6", "d7", "d8"}; | 92 | String[] hops = {"d1", "d2", "d3", "d4", "d5", "d6", "d7", "d8"}; |
95 | PointToPointIntentCompiler compiler = makeCompiler(hops); | 93 | PointToPointIntentCompiler compiler = makeCompiler(hops); |
96 | - assertThat(compiler, is(notNullValue())); | ||
97 | 94 | ||
98 | List<Intent> result = compiler.compile(intent, null, null); | 95 | List<Intent> result = compiler.compile(intent, null, null); |
99 | assertThat(result, is(Matchers.notNullValue())); | 96 | assertThat(result, is(Matchers.notNullValue())); |
... | @@ -122,11 +119,9 @@ public class PointToPointIntentCompilerTest extends AbstractIntentTest { | ... | @@ -122,11 +119,9 @@ public class PointToPointIntentCompilerTest extends AbstractIntentTest { |
122 | public void testReversePathCompilation() { | 119 | public void testReversePathCompilation() { |
123 | 120 | ||
124 | PointToPointIntent intent = makeIntent("d8", "d1"); | 121 | PointToPointIntent intent = makeIntent("d8", "d1"); |
125 | - assertThat(intent, is(notNullValue())); | ||
126 | 122 | ||
127 | String[] hops = {"d1", "d2", "d3", "d4", "d5", "d6", "d7", "d8"}; | 123 | String[] hops = {"d1", "d2", "d3", "d4", "d5", "d6", "d7", "d8"}; |
128 | PointToPointIntentCompiler compiler = makeCompiler(hops); | 124 | PointToPointIntentCompiler compiler = makeCompiler(hops); |
129 | - assertThat(compiler, is(notNullValue())); | ||
130 | 125 | ||
131 | List<Intent> result = compiler.compile(intent, null, null); | 126 | List<Intent> result = compiler.compile(intent, null, null); |
132 | assertThat(result, is(Matchers.notNullValue())); | 127 | assertThat(result, is(Matchers.notNullValue())); | ... | ... |
-
Please register or login to post a comment