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