1 /* |
1 /* |
2 * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
208 assertUniqueEventTypes(types); |
208 assertUniqueEventTypes(types); |
209 assertHasEventType(types, "Event1"); |
209 assertHasEventType(types, "Event1"); |
210 assertHasEventType(types, "Event2"); |
210 assertHasEventType(types, "Event2"); |
211 assertMissingEventType(types, "Event3"); |
211 assertMissingEventType(types, "Event3"); |
212 } |
212 } |
213 try (RecordingFile f = new RecordingFile(twoEventTypes)) { |
213 try (RecordingFile f = new RecordingFile(threeEventTypes)) { |
214 List<EventType> types = f.readEventTypes(); |
214 List<EventType> types = f.readEventTypes(); |
215 assertUniqueEventTypes(types); |
215 assertUniqueEventTypes(types); |
216 assertHasEventType(types, "Event1"); |
216 assertHasEventType(types, "Event1"); |
217 assertHasEventType(types, "Event2"); |
217 assertHasEventType(types, "Event2"); |
218 assertMissingEventType(types, "Event3"); |
218 assertHasEventType(types, "Event3"); |
219 } |
219 } |
220 |
220 |
221 } |
221 } |
222 |
222 |
223 private static void assertMissingEventType(List<EventType> types,String name) throws Exception { |
223 private static void assertMissingEventType(List<EventType> types,String name) throws Exception { |