public class TopicDOMNotificationTest {
- private static final String containerNodeBodyMockToString = "containerNodeBodyMock";
+ private static final String CONTAINER_NODE_BODY_MOCK_TO_STRING = "containerNodeBodyMock";
ContainerNode containerNodeBodyMock;
TopicDOMNotification topicDOMNotification;
@BeforeClass
- public static void initTestClass() throws IllegalAccessException, InstantiationException {
+ public static void initTestClass() {
}
@Before
- public void setUp() throws Exception {
+ public void setUp() {
containerNodeBodyMock = mock(ContainerNode.class);
- doReturn(containerNodeBodyMockToString).when(containerNodeBodyMock).toString();
+ doReturn(CONTAINER_NODE_BODY_MOCK_TO_STRING).when(containerNodeBodyMock).toString();
topicDOMNotification = new TopicDOMNotification(containerNodeBodyMock);
}
@Test
public void getTypeTest() {
- SchemaPath TOPIC_NOTIFICATION_ID = SchemaPath.create(true, TopicNotification.QNAME);
- assertEquals("Type has not been created correctly.", TOPIC_NOTIFICATION_ID, topicDOMNotification.getType());
+ SchemaPath topicNotificationId = SchemaPath.create(true, TopicNotification.QNAME);
+ assertEquals("Type has not been created correctly.", topicNotificationId, topicDOMNotification.getType());
}
@Test
@Test
public void getToStringTest() {
- String bodyString = "TopicDOMNotification [body=" + containerNodeBodyMockToString + "]";
+ String bodyString = "TopicDOMNotification [body=" + CONTAINER_NODE_BODY_MOCK_TO_STRING + "]";
assertEquals("String has not been created correctly.", bodyString, topicDOMNotification.toString());
}
-}
\ No newline at end of file
+}