1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.commons.lang3.builder;
18
19 import static org.junit.jupiter.api.Assertions.assertEquals;
20
21 import org.apache.commons.lang3.AbstractLangTest;
22 import org.junit.jupiter.api.Test;
23
24
25
26
27 class ToStringStyleTest extends AbstractLangTest {
28
29
30
31
32 static class Person {
33
34
35
36 String name;
37
38
39
40
41 int age;
42
43
44
45
46 boolean smoker;
47 }
48
49 private static final class ToStringStyleImpl extends ToStringStyle {
50 private static final long serialVersionUID = 1L;
51
52 }
53
54 @Test
55 void testSetArrayEnd() {
56 final ToStringStyle style = new ToStringStyleImpl();
57 style.setArrayEnd(null);
58 assertEquals("", style.getArrayEnd());
59 }
60
61 @Test
62 void testSetArraySeparator() {
63 final ToStringStyle style = new ToStringStyleImpl();
64 style.setArraySeparator(null);
65 assertEquals("", style.getArraySeparator());
66 }
67
68 @Test
69 void testSetArrayStart() {
70 final ToStringStyle style = new ToStringStyleImpl();
71 style.setArrayStart(null);
72 assertEquals("", style.getArrayStart());
73 }
74
75 @Test
76 void testSetContentEnd() {
77 final ToStringStyle style = new ToStringStyleImpl();
78 style.setContentEnd(null);
79 assertEquals("", style.getContentEnd());
80 }
81
82 @Test
83 void testSetContentStart() {
84 final ToStringStyle style = new ToStringStyleImpl();
85 style.setContentStart(null);
86 assertEquals("", style.getContentStart());
87 }
88
89 @Test
90 void testSetFieldNameValueSeparator() {
91 final ToStringStyle style = new ToStringStyleImpl();
92 style.setFieldNameValueSeparator(null);
93 assertEquals("", style.getFieldNameValueSeparator());
94 }
95
96 @Test
97 void testSetFieldSeparator() {
98 final ToStringStyle style = new ToStringStyleImpl();
99 style.setFieldSeparator(null);
100 assertEquals("", style.getFieldSeparator());
101 }
102
103 @Test
104 void testSetNullText() {
105 final ToStringStyle style = new ToStringStyleImpl();
106 style.setNullText(null);
107 assertEquals("", style.getNullText());
108 }
109
110 @Test
111 void testSetSizeEndText() {
112 final ToStringStyle style = new ToStringStyleImpl();
113 style.setSizeEndText(null);
114 assertEquals("", style.getSizeEndText());
115 }
116
117 @Test
118 void testSetSizeStartText() {
119 final ToStringStyle style = new ToStringStyleImpl();
120 style.setSizeStartText(null);
121 assertEquals("", style.getSizeStartText());
122 }
123
124 @Test
125 void testSetSummaryObjectEndText() {
126 final ToStringStyle style = new ToStringStyleImpl();
127 style.setSummaryObjectEndText(null);
128 assertEquals("", style.getSummaryObjectEndText());
129 }
130
131 @Test
132 void testSetSummaryObjectStartText() {
133 final ToStringStyle style = new ToStringStyleImpl();
134 style.setSummaryObjectStartText(null);
135 assertEquals("", style.getSummaryObjectStartText());
136 }
137 }