public void testTerminalStructConstructor() {
assertSame("getName", fFieldName1, fStructTerminalField1.getName());
assertNull("getValue", fStructTerminalField1.getValue());
- assertNull("getFields", fStructTerminalField1.getFields());
+ assertEquals("getFields", 0, fStructTerminalField1.getFields().length);
assertNull("getField(name)", fStructTerminalField1.getField(fFieldName1));
assertNull("getField(index)", fStructTerminalField1.getField(0));
assertEquals("getFieldNames", 0, fStructTerminalField1.getFieldNames().length);
public void testTerminalConstructor() {
assertSame("getName", fFieldName1, fField1.getName());
assertSame("getValue", fValue1, fField1.getValue());
- assertNull("getFields", fField1.getFields());
+ assertEquals("getFields", 0, fField1.getFields().length);
assertNull("getField(name)", fField1.getField(fFieldName1));
assertNull("getField(index)", fField1.getField(0));
assertEquals("getFieldNames", 0, fField1.getFieldNames().length);
assertSame("getName", fFieldName2, fField2.getName());
assertSame("getValue", fValue2, fField2.getValue());
- assertNull("getFields", fField2.getFields());
+ assertEquals("getFields", 0, fField2.getFields().length);
assertNull("getField(name)", fField2.getField(fFieldName2));
assertNull("getField(index)", fField2.getField(0));
assertEquals("getFieldNames", 0, fField2.getFieldNames().length);
final TmfEventField copy = new TmfEventField(fField1);
assertSame("getName", fFieldName1, copy.getName());
assertSame("getValue", fValue1, copy.getValue());
- assertNull("getFields", copy.getFields());
+ assertEquals("getFields", 0, copy.getFields().length);
assertNull("getField(name)", copy.getField(fFieldName1));
assertNull("getField(index)", copy.getField(0));
assertEquals("getFieldNames", 0, copy.getFieldNames().length);
public void testClear() {
fInstance.clear();
assertEquals("clear", 0, fInstance.getContexts().length);
- assertNull("clear", fInstance.getTypes(null));
+ assertEquals("clear", 0, fInstance.getTypes(null).length);
assertNull("clear", fInstance.getType(null, null));
assertEquals("clear", "TmfEventTypeManager [fEventTypes={}]", fInstance.toString());
}
assertEquals("clear context", fContext2, contexts[0]);
ITmfEventType[] types = fInstance.getTypes(fContext1);
- assertNull("clear context", types);
+ assertEquals("clear context", 0, types.length);
ITmfEventType type = fInstance.getType(fContext1, fType0.getName());
assertNull("clear context", type);