File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -17,13 +17,25 @@ public void Standalone_ReturnsWithNoSpacing ()
17
17
AssertIsHr ( elements [ 0 ] , false ) ;
18
18
}
19
19
20
- [ Test ( Description = "should not generate a particular spacing because border-bottom is empty" ) ]
20
+ [ Test ( Description = "Should not generate a particular spacing because border-bottom is empty" ) ]
21
21
public void AfterBorderlessContent_ReturnsWithNoSpacing ( )
22
22
{
23
23
var elements = converter . Parse ( "<p style='border-top:1px solid black'>Before</p><hr>" ) ;
24
24
AssertIsHr ( elements [ 1 ] , false ) ;
25
25
}
26
26
27
+ [ Test ( Description = "User can provide his own stylised horizontal separator" ) ]
28
+ public void Bordered_ReturnsWithStylisedBorder ( )
29
+ {
30
+ var elements = converter . Parse ( "<hr style='border:3px dotted red'>" ) ;
31
+ AssertIsHr ( elements [ 0 ] , false ) ;
32
+ var borders = elements [ 0 ] . GetFirstChild < ParagraphProperties > ( ) ? . ParagraphBorders ;
33
+ Assert . That ( borders , Is . Not . Null ) ;
34
+ Assert . That ( borders . TopBorder ? . Val ? . Value , Is . EqualTo ( BorderValues . Dotted ) ) ;
35
+ Assert . That ( borders . TopBorder ? . Color ? . Value , Is . EqualTo ( "FF0000" ) ) ;
36
+ Assert . That ( borders . TopBorder ? . Size ? . Value , Is . EqualTo ( 2 ) ) ;
37
+ }
38
+
27
39
[ TestCase ( "<p style='border:0.1px solid black'>Before</p><hr>" ) ]
28
40
[ TestCase ( "<p style='border-bottom:1px solid black'>Before</p><hr>" ) ]
29
41
[ TestCase ( "<table><tr><td>Cell</td></tr></table><hr>" ) ]
You can’t perform that action at this time.
0 commit comments