• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

hazendaz / httpunit / 755

14 Feb 2026 07:14PM UTC coverage: 80.526%. Remained the same
755

push

github

hazendaz
[ci] Fix badge

3213 of 4105 branches covered (78.27%)

Branch coverage included in aggregate %.

8245 of 10124 relevant lines covered (81.44%)

0.81 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

76.47
/src/main/java/com/meterware/httpunit/dom/TextImpl.java
1
/*
2
 * SPDX-License-Identifier: MIT
3
 * See LICENSE file for details.
4
 *
5
 * Copyright 2000-2026 Russell Gold
6
 * Copyright 2021-2000 hazendaz
7
 */
8
package com.meterware.httpunit.dom;
9

10
import org.w3c.dom.DOMException;
11
import org.w3c.dom.Node;
12
import org.w3c.dom.Text;
13

14
/**
15
 * The Class TextImpl.
16
 */
17
public class TextImpl extends CharacterDataImpl implements Text {
1✔
18

19
    /** The Constant serialVersionUID. */
20
    private static final long serialVersionUID = 1L;
21

22
    /**
23
     * Creates the text.
24
     *
25
     * @param ownerDocument
26
     *            the owner document
27
     * @param data
28
     *            the data
29
     *
30
     * @return the text impl
31
     */
32
    static TextImpl createText(DocumentImpl ownerDocument, String data) {
33
        TextImpl text = new TextImpl();
1✔
34
        text.initialize(ownerDocument, data);
1✔
35
        return text;
1✔
36
    }
37

38
    @Override
39
    public String getNodeName() {
40
        return "#text";
1✔
41
    }
42

43
    @Override
44
    public String getNodeValue() throws DOMException {
45
        return getData();
1✔
46
    }
47

48
    @Override
49
    public void setNodeValue(String nodeValue) throws DOMException {
50
        setData(nodeValue);
1✔
51
    }
1✔
52

53
    @Override
54
    public short getNodeType() {
55
        return TEXT_NODE;
1✔
56
    }
57

58
    @Override
59
    protected NodeImpl getChildIfPermitted(Node proposedChild) {
60
        throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, "Text nodes may not have children");
1✔
61
    }
62

63
    @Override
64
    public Text splitText(int offset) throws DOMException {
65
        return null;
×
66
    }
67

68
    /**
69
     * Import node.
70
     *
71
     * @param document
72
     *            the document
73
     * @param text
74
     *            the text
75
     *
76
     * @return the node
77
     */
78
    public static Node importNode(DocumentImpl document, Text text) {
79
        return document.createTextNode(text.getData());
1✔
80
    }
81

82
    @Override
83
    void appendContents(StringBuilder sb) {
84
        sb.append(getData());
1✔
85
    }
1✔
86

87
    // ------------------------------------- DOM level 3 methods
88
    // ------------------------------------------------------------
89

90
    @Override
91
    public boolean isElementContentWhitespace() {
92
        return false; // To change body of implemented methods use File | Settings | File Templates.
×
93
    }
94

95
    @Override
96
    public String getWholeText() {
97
        return null; // To change body of implemented methods use File | Settings | File Templates.
×
98
    }
99

100
    @Override
101
    public Text replaceWholeText(String content) throws DOMException {
102
        return null; // To change body of implemented methods use File | Settings | File Templates.
×
103
    }
104
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc