@@ -0,0 +1,2636 @@
+/*%0A * Licensed to the Indoqa Software Design und Beratung GmbH (Indoqa) under%0A * one or more contributor license agreements. See the NOTICE file distributed%0A * with this work for additional information regarding copyright ownership.%0A * Indoqa licenses this file to You under the Apache License, Version 2.0%0A * (the %22License%22); you may not use this file except in compliance with%0A * the License.  You may obtain a copy of the License at%0A *%0A *      http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage com.indoqa.boot.html.react;%0A%0Aimport static org.junit.Assert.*;%0A%0Aimport com.indoqa.boot.html.react.IndexHtmlBuilder.HtmlParts;%0Aimport org.junit.Test;%0A%0Apublic class HtmlPartsTest %7B%0A%0A    @Test%0A    public void findAllParts() %7B%0A        HtmlParts htmlParts = new HtmlParts(%0A            %22%3Chtml%3E%5Cn%3Chead%3Efoo%3Ctitle%3Ebar%3C/title%3E%3Cmeta name=%5C%22a%5C%22 content=%5C%22b%5C%22/%3E%3C/head%3E%3Cbody class=%5C%22abc%5C%22%3E%3Ch1%3Etest%3C/h1%3E%3C/body%3E%3C/html%3E%22);%0A        assertEquals(%22%3Chtml%3E%5Cn%22, htmlParts.getBeforeHeadContent());%0A        assertEquals(%22%3Chead%3E%22, htmlParts.getHeadElement());%0A        assertEquals(%22foo%3Cmeta name=%5C%22a%5C%22 content=%5C%22b%5C%22/%3E%22, htmlParts.getHeadContent());%0A        assertEquals(%22%3Cbody class=%5C%22abc%5C%22%3E%22, htmlParts.getBodyElement());%0A        assertEquals(%22%3Ch1%3Etest%3C/h1%3E%22, htmlParts.getBodyContent());%0A        assertEquals(%22%3Ch1%3Etest%3C/h1%3E%22, htmlParts.getBodyContent());%0A        assertEquals(%22%3Ctitle%3Ebar%3C/title%3E%22, htmlParts.getTitle());%0A    %7D%0A%0A    @Test%0A    public void findNoParts() %7B%0A        HtmlParts htmlParts = new HtmlParts(%22foo%22);%0A        assertEquals(%22%3C!DOCTYPE html%3E%5Cn%3Chtml lang=%5C%22de%5C%22%3E%22, htmlParts.getBeforeHeadContent());%0A        assertEquals(%22%3Chead%3E%22, htmlParts.getHeadElement());%0A        assertNull(htmlParts.getHeadContent());%0A        assertEquals(%22%3Cbody%3E%22, htmlParts.getBodyElement());%0A        assertNull(htmlParts.getBodyContent());%0A        assertNull(htmlParts.getTitle());%0A    %7D%0A%0A    @Test%0A    public void nullInput() %7B%0A        HtmlParts htmlParts = new HtmlParts(null);%0A        assertEquals(%22%3C!DOCTYPE html%3E%5Cn%3Chtml lang=%5C%22de%5C%22%3E%22, htmlParts.getBeforeHeadContent());%0A        assertEquals(%22%3Chead%3E%22, htmlParts.getHeadElement());%0A        assertNull(htmlParts.getHeadContent());%0A        assertEquals(%22%3Cbody%3E%22, htmlParts.getBodyElement());%0A        assertNull(htmlParts.getBodyContent());%0A        assertNull(htmlParts.getTitle());%0A    %7D%0A%7D%0A

support htmlHead modifications (test)