Commit 5809730 mtu
committed
File tree 2 files changed +19
-1
lines changed
tests/Yaapii.Atoms.Tests/Text
2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ public sealed class TextBase64 : TextEnvelope
34
34
/// A <see cref="string"/> as Base64-Encoded <see cref="IText"/>
35
35
/// </summary>
36
36
/// <param name="str">string to encode</param>
37
- public TextBase64 ( String str ) : base ( ( ) => str , false )
37
+ public TextBase64 ( String str ) : this ( new LiveText ( str ) )
38
38
{ }
39
39
40
40
/// <summary>
Original file line number Diff line number Diff line change @@ -64,5 +64,23 @@ public void EncodesText(string text)
64
64
) ;
65
65
}
66
66
}
67
+
68
+ [ Theory ]
69
+ [ InlineData ( "A fancy text" ) ]
70
+ [ InlineData ( "A fancy text with \n line break" ) ]
71
+ [ InlineData ( "A fancy text with € special character" ) ]
72
+ public void EncodesString ( string text )
73
+ {
74
+ Assert . Equal (
75
+ new LiveText (
76
+ new BytesBase64 (
77
+ new BytesOf (
78
+ new LiveText ( text )
79
+ )
80
+ )
81
+ ) . AsString ( ) ,
82
+ new TextBase64 ( text ) . AsString ( )
83
+ ) ;
84
+ }
67
85
}
68
86
}
You can’t perform that action at this time.
0 commit comments