* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.openflowplugin.impl.common;
import org.junit.Assert;
@Before
- public void setUp() throws Exception {
+ public void setUp() {
ofVersion = OFConstants.OFP_VERSION_1_3;
}
@Test
- public void testMakeMultipartRequestInput_DESC() throws Exception {
+ public void testMakeMultipartRequestInput_DESC() {
MultipartType mpType = MultipartType.OFPMPDESC;
final MultipartRequestInput mpRqInput =
(MultipartRequestInput) MultipartRequestInputFactory.makeMultipartRequest(xid, ofVersion, mpType, false);
checkHeader(mpRqInput, mpType);
- checkEmptyBody(mpRqInput.getMultipartRequestBody().getImplementedInterface(), MultipartRequestDescCase.class);
+ checkEmptyBody(mpRqInput.getMultipartRequestBody().implementedInterface(), MultipartRequestDescCase.class);
}
@Test
- public void testMakeMultipartRequestInput_FLOW_13() throws Exception {
+ public void testMakeMultipartRequestInput_FLOW_13() {
final MultipartType mpType = MultipartType.OFPMPFLOW;
final MultipartRequestInput mpRqInput =
(MultipartRequestInput) MultipartRequestInputFactory.makeMultipartRequest(xid, ofVersion, mpType, false);
}
@Test
- public void testMakeMultipartRequestInput_FLOW_10() throws Exception {
+ public void testMakeMultipartRequestInput_FLOW_10() {
final MultipartType mpType = MultipartType.OFPMPFLOW;
ofVersion = OFConstants.OFP_VERSION_1_0;
final MultipartRequestInput mpRqInput =
}
@Test
- public void testMakeMultipartRequestInputAggregate() throws Exception {
+ public void testMakeMultipartRequestInputAggregate() {
MultipartType mpType = MultipartType.OFPMPAGGREGATE;
final MultipartRequestInput mpRqInput =
(MultipartRequestInput) MultipartRequestInputFactory.makeMultipartRequest(xid, ofVersion, mpType, false);
checkHeader(mpRqInput, mpType);
- checkEmptyBody(mpRqInput.getMultipartRequestBody().getImplementedInterface(),
+ checkEmptyBody(mpRqInput.getMultipartRequestBody().implementedInterface(),
MultipartRequestAggregateCase.class);
}
@Test
- public void testMakeMultipartRequestInputTable() throws Exception {
+ public void testMakeMultipartRequestInputTable() {
MultipartType mpType = MultipartType.OFPMPTABLE;
final MultipartRequestInput mpRqInput =
(MultipartRequestInput) MultipartRequestInputFactory.makeMultipartRequest(xid, ofVersion, mpType, false);
checkHeader(mpRqInput, mpType);
- checkEmptyBody(mpRqInput.getMultipartRequestBody().getImplementedInterface(), MultipartRequestTableCase.class);
+ checkEmptyBody(mpRqInput.getMultipartRequestBody().implementedInterface(), MultipartRequestTableCase.class);
}
@Test
- public void testMakeMultipartRequestInputPortStats() throws Exception {
+ public void testMakeMultipartRequestInputPortStats() {
final MultipartType mpType = MultipartType.OFPMPPORTSTATS;
final MultipartRequestInput mpRqInput =
(MultipartRequestInput) MultipartRequestInputFactory.makeMultipartRequest(xid, ofVersion, mpType, false);
}
@Test
- public void testMakeMultipartRequestInputQueue() throws Exception {
+ public void testMakeMultipartRequestInputQueue() {
final MultipartType mpType = MultipartType.OFPMPQUEUE;
final MultipartRequestInput mpRqInput =
(MultipartRequestInput) MultipartRequestInputFactory.makeMultipartRequest(xid, ofVersion, mpType, false);
}
@Test
- public void testMakeMultipartRequestInputGroup() throws Exception {
+ public void testMakeMultipartRequestInputGroup() {
final MultipartType mpType = MultipartType.OFPMPGROUP;
final MultipartRequestInput mpRqInput =
(MultipartRequestInput) MultipartRequestInputFactory.makeMultipartRequest(xid, ofVersion, mpType, false);
}
@Test
- public void testMakeMultipartRequestInputGroupDesc() throws Exception {
+ public void testMakeMultipartRequestInputGroupDesc() {
MultipartType mpType = MultipartType.OFPMPGROUPDESC;
final MultipartRequestInput mpRqInput =
(MultipartRequestInput) MultipartRequestInputFactory.makeMultipartRequest(xid, ofVersion, mpType, false);
checkHeader(mpRqInput, mpType);
- checkEmptyBody(mpRqInput.getMultipartRequestBody().getImplementedInterface(),
+ checkEmptyBody(mpRqInput.getMultipartRequestBody().implementedInterface(),
MultipartRequestGroupDescCase.class);
}
@Test
- public void testMakeMultipartRequestInputGroupFeatures() throws Exception {
+ public void testMakeMultipartRequestInputGroupFeatures() {
MultipartType mpType = MultipartType.OFPMPGROUPFEATURES;
final MultipartRequestInput mpRqInput =
(MultipartRequestInput) MultipartRequestInputFactory.makeMultipartRequest(xid, ofVersion, mpType, false);
checkHeader(mpRqInput, mpType);
- checkEmptyBody(mpRqInput.getMultipartRequestBody().getImplementedInterface(),
+ checkEmptyBody(mpRqInput.getMultipartRequestBody().implementedInterface(),
MultipartRequestGroupFeaturesCase.class);
}
@Test
- public void testMakeMultipartRequestInputMeter() throws Exception {
+ public void testMakeMultipartRequestInputMeter() {
final MultipartType mpType = MultipartType.OFPMPMETER;
final MultipartRequestInput mpRqInput =
(MultipartRequestInput) MultipartRequestInputFactory.makeMultipartRequest(xid, ofVersion, mpType, false);
}
@Test
- public void testMakeMultipartRequestInputMeterConfig() throws Exception {
+ public void testMakeMultipartRequestInputMeterConfig() {
final MultipartType mpType = MultipartType.OFPMPMETERCONFIG;
final MultipartRequestInput mpRqInput =
(MultipartRequestInput) MultipartRequestInputFactory.makeMultipartRequest(xid, ofVersion, mpType, false);
}
@Test
- public void testMakeMultipartRequestInputMeterFeatures() throws Exception {
+ public void testMakeMultipartRequestInputMeterFeatures() {
MultipartType mpType = MultipartType.OFPMPMETERFEATURES;
final MultipartRequestInput mpRqInput =
(MultipartRequestInput) MultipartRequestInputFactory.makeMultipartRequest(xid, ofVersion, mpType, false);
checkHeader(mpRqInput, mpType);
- checkEmptyBody(mpRqInput.getMultipartRequestBody().getImplementedInterface(),
+ checkEmptyBody(mpRqInput.getMultipartRequestBody().implementedInterface(),
MultipartRequestMeterFeaturesCase.class);
}
@Test
- public void testMakeMultipartRequestInputTableFeatures() throws Exception {
+ public void testMakeMultipartRequestInputTableFeatures() {
final MultipartType mpType = MultipartType.OFPMPTABLEFEATURES;
final MultipartRequestInput mpRqInput =
(MultipartRequestInput) MultipartRequestInputFactory.makeMultipartRequest(xid, ofVersion, mpType, false);
}
@Test
- public void testMakeMultipartRequestInputPortDesc() throws Exception {
+ public void testMakeMultipartRequestInputPortDesc() {
MultipartType mpType = MultipartType.OFPMPPORTDESC;
final MultipartRequestInput mpRqInput =
(MultipartRequestInput) MultipartRequestInputFactory.makeMultipartRequest(xid, ofVersion, mpType, false);
checkHeader(mpRqInput, mpType);
- checkEmptyBody(mpRqInput.getMultipartRequestBody().getImplementedInterface(),
+ checkEmptyBody(mpRqInput.getMultipartRequestBody().implementedInterface(),
MultipartRequestPortDescCase.class);
}
@Test
- public void testMakeMultipartRequestInputExperimenter() throws Exception {
+ public void testMakeMultipartRequestInputExperimenter() {
MultipartType mpType = MultipartType.OFPMPEXPERIMENTER;
final MultipartRequestInput mpRqInput =
(MultipartRequestInput) MultipartRequestInputFactory.makeMultipartRequest(xid, ofVersion, mpType, false);
checkHeader(mpRqInput, mpType);
- checkEmptyBody(mpRqInput.getMultipartRequestBody().getImplementedInterface(),
+ checkEmptyBody(mpRqInput.getMultipartRequestBody().implementedInterface(),
MultipartRequestExperimenterCase.class);
}
Assert.assertEquals(xid, mpRqInput.getXid().longValue());
}
- private void checkEmptyBody(Class<? extends DataContainer> mpRqBody, Class<? extends
- MultipartRequestBody> expectedMpRqBodyClass) throws Exception {
+ private static void checkEmptyBody(Class<? extends DataContainer> mpRqBody, Class<? extends
+ MultipartRequestBody> expectedMpRqBodyClass) {
Assert.assertTrue(expectedMpRqBodyClass.isAssignableFrom(mpRqBody));
Assert.assertEquals(expectedMpRqBodyClass, mpRqBody);
}