@@ -94,6 +94,91 @@ describe(TextProperties.name, () => {
9494 } ) ;
9595 } ) ;
9696
97+ describe ( 'overline' , ( ) => {
98+ const testLineColor = Color . fromRgb ( 1 , 2 , 3 ) ;
99+ const testLineMode = LineMode . SkipWhiteSpace ;
100+ const testLineStyle = LineStyle . Wave ;
101+ const testLineType = LineType . Double ;
102+ const testLineWidth = 13.37 ;
103+ const expectedLine : Readonly < TextLine > = {
104+ color : testLineColor ,
105+ mode : testLineMode ,
106+ style : testLineStyle ,
107+ type : testLineType ,
108+ width : testLineWidth ,
109+ } ;
110+
111+ it ( 'return undefined by default' , ( ) => {
112+ // Assert
113+ expect ( properties . getOverline ( ) ) . toBeUndefined ( ) ;
114+ } ) ;
115+
116+ it ( 'return line with defaults if no parameters are passed' , ( ) => {
117+ // Arrange
118+ const expectedDefaultLine : TextLine = {
119+ color : 'font-color' ,
120+ mode : LineMode . Continuous ,
121+ style : LineStyle . Solid ,
122+ type : LineType . Single ,
123+ width : LineWidth . Auto ,
124+ } ;
125+
126+ // Act
127+ properties . setOverline ( ) ;
128+
129+ // Assert
130+ expect ( properties . getOverline ( ) ) . toEqual ( expectedDefaultLine ) ;
131+ } ) ;
132+
133+ it ( 'return previously set line' , ( ) => {
134+ // Act
135+ properties . setOverline (
136+ testLineColor ,
137+ testLineWidth ,
138+ testLineStyle ,
139+ testLineType ,
140+ testLineMode
141+ ) ;
142+
143+ // Assert
144+ expect ( properties . getOverline ( ) ) . toEqual ( expectedLine ) ;
145+ } ) ;
146+
147+ it ( 'ignore invalid value' , ( ) => {
148+ // Arrange
149+ properties . setOverline (
150+ testLineColor ,
151+ testLineWidth ,
152+ testLineStyle ,
153+ testLineType ,
154+ testLineMode
155+ ) ;
156+
157+ // Act
158+ properties . setOverline ( testLineColor , - 0.1 ) ;
159+
160+ // Assert
161+ expect ( properties . getOverline ( ) ) . toEqual ( expectedLine ) ;
162+ } ) ;
163+
164+ it ( 'remove previously set border' , ( ) => {
165+ // Arrange
166+ properties . setOverline (
167+ testLineColor ,
168+ testLineWidth ,
169+ testLineStyle ,
170+ testLineType ,
171+ testLineMode
172+ ) ;
173+
174+ // Act
175+ properties . removeOverline ( ) ;
176+
177+ // Assert
178+ expect ( properties . getOverline ( ) ) . toBeUndefined ( ) ;
179+ } ) ;
180+ } ) ;
181+
97182 describe ( 'text transformation' , ( ) => {
98183 it ( 'return `None` by default' , ( ) => {
99184 expect ( properties . getTextTransformation ( ) ) . toBe ( TextTransformation . None ) ;
0 commit comments