@Test @DisplayName("containsMultipleDocuments, multiple documents with linux line ends, should return true") void containsMultipleDocumentsWithMultipleDocumentsAndLinuxLineEnds() { final String multiDocument = "---\napiVersion: v1\nKind: Something\n\n---\napiVersion: v2\nKind: Other"; final boolean result = Serialization.containsMultipleDocuments(multiDocument); assertTrue(result); }
static boolean containsMultipleDocuments(String specFile) { final long validDocumentCount = splitSpecFile(specFile).stream().filter(Serialization::validate) .count(); return validDocumentCount > 1; }
Serialization { static boolean containsMultipleDocuments(String specFile) { final long validDocumentCount = splitSpecFile(specFile).stream().filter(Serialization::validate) .count(); return validDocumentCount > 1; } }
Serialization { static boolean containsMultipleDocuments(String specFile) { final long validDocumentCount = splitSpecFile(specFile).stream().filter(Serialization::validate) .count(); return validDocumentCount > 1; } private  Serialization(); }
Serialization { static boolean containsMultipleDocuments(String specFile) { final long validDocumentCount = splitSpecFile(specFile).stream().filter(Serialization::validate) .count(); return validDocumentCount > 1; } private  Serialization(); static ObjectMapper jsonMapper(); static ObjectMapper yamlMapper(); static String asJson(T object); static String asYaml(T object); static T unmarshal(InputStream is); @SuppressWarnings("unchecked") static T unmarshal(InputStream is, Map<String, String> parameters); static T unmarshal(InputStream is, ObjectMapper mapper); static T unmarshal(InputStream is, ObjectMapper mapper, Map<String, String> parameters); static T unmarshal(String str, final Class<T> type); static T unmarshal(String str, final Class<T> type, Map<String, String> parameters); static T unmarshal(InputStream is, final Class<T> type); static T unmarshal(InputStream is, final Class<T> type, Map<String, String> parameters); static T unmarshal(InputStream is, TypeReference<T> type); static T unmarshal(InputStream is, TypeReference<T> type, Map<String, String> parameters); }
Serialization { static boolean containsMultipleDocuments(String specFile) { final long validDocumentCount = splitSpecFile(specFile).stream().filter(Serialization::validate) .count(); return validDocumentCount > 1; } private  Serialization(); static ObjectMapper jsonMapper(); static ObjectMapper yamlMapper(); static String asJson(T object); static String asYaml(T object); static T unmarshal(InputStream is); @SuppressWarnings("unchecked") static T unmarshal(InputStream is, Map<String, String> parameters); static T unmarshal(InputStream is, ObjectMapper mapper); static T unmarshal(InputStream is, ObjectMapper mapper, Map<String, String> parameters); static T unmarshal(String str, final Class<T> type); static T unmarshal(String str, final Class<T> type, Map<String, String> parameters); static T unmarshal(InputStream is, final Class<T> type); static T unmarshal(InputStream is, final Class<T> type, Map<String, String> parameters); static T unmarshal(InputStream is, TypeReference<T> type); static T unmarshal(InputStream is, TypeReference<T> type, Map<String, String> parameters);  }