@@ -43,65 +43,65 @@ public void LengthToPixelsPercentThrowsOnInvalidRenderDimensions()
43
43
{
44
44
var l = new Length ( 50 , Length . Unit . Percent ) ;
45
45
var renderDevice = new DefaultRenderDevice ( ) ;
46
- Assert . Throws < ArgumentException > ( ( ) => l . ToPixel ( renderDevice ) ) ;
47
- Assert . Throws < ArgumentException > ( ( ) => l . ToPixel ( null ) ) ;
46
+ Assert . Throws < ArgumentException > ( ( ) => l . ToPixel ( renderDevice , RenderMode . Undefined ) ) ;
47
+ Assert . Throws < ArgumentException > ( ( ) => l . ToPixel ( null , RenderMode . Undefined ) ) ;
48
48
}
49
49
50
50
[ Test ]
51
51
public void LengthToPixelsEmThrowsOnInvalidRenderDimensions ( )
52
52
{
53
53
var l = new Length ( 50 , Length . Unit . Em ) ;
54
54
var renderDevice = new DefaultRenderDevice { FontSize = 0 } ;
55
- Assert . Throws < ArgumentException > ( ( ) => l . ToPixel ( renderDevice ) ) ;
56
- Assert . Throws < ArgumentException > ( ( ) => l . ToPixel ( null ) ) ;
55
+ Assert . Throws < ArgumentException > ( ( ) => l . ToPixel ( renderDevice , RenderMode . Undefined ) ) ;
56
+ Assert . Throws < ArgumentException > ( ( ) => l . ToPixel ( null , RenderMode . Undefined ) ) ;
57
57
}
58
58
59
59
[ Test ]
60
60
public void LengthToPixelsCorrectPercentWidth ( )
61
61
{
62
62
var l = new Length ( 50 , Length . Unit . Percent ) ;
63
63
var renderDevice = new DefaultRenderDevice { ViewPortWidth = 500 } ;
64
- Assert . AreEqual ( 250 , l . ToPixel ( renderDevice , true ) ) ;
64
+ Assert . AreEqual ( 250 , l . ToPixel ( renderDevice , RenderMode . Horizontal ) ) ;
65
65
}
66
66
67
67
[ Test ]
68
68
public void LengthToPixelsCorrectPercentHeight ( )
69
69
{
70
70
var l = new Length ( 25 , Length . Unit . Percent ) ;
71
71
var renderDevice = new DefaultRenderDevice { ViewPortHeight = 600 } ;
72
- Assert . AreEqual ( 150 , l . ToPixel ( renderDevice , false ) ) ;
72
+ Assert . AreEqual ( 150 , l . ToPixel ( renderDevice , RenderMode . Vertical ) ) ;
73
73
}
74
74
75
75
[ Test ]
76
76
public void LengthToPixelsCorrectRem ( )
77
77
{
78
78
var l = new Length ( 25 , Length . Unit . Rem ) ;
79
79
var renderDevice = new DefaultRenderDevice { FontSize = 10 } ;
80
- Assert . AreEqual ( 250 , l . ToPixel ( renderDevice ) ) ;
80
+ Assert . AreEqual ( 250 , l . ToPixel ( renderDevice , RenderMode . Undefined ) ) ;
81
81
}
82
82
83
83
[ Test ]
84
84
public void LengthToPixelsCorrectEm ( )
85
85
{
86
86
var l = new Length ( 10 , Length . Unit . Em ) ;
87
87
var renderDevice = new DefaultRenderDevice { FontSize = 10 } ;
88
- Assert . AreEqual ( 100 , l . ToPixel ( renderDevice ) ) ;
88
+ Assert . AreEqual ( 100 , l . ToPixel ( renderDevice , RenderMode . Undefined ) ) ;
89
89
}
90
90
91
91
[ Test ]
92
92
public void LengthToPixelsCorrectVh ( )
93
93
{
94
94
var l = new Length ( 10 , Length . Unit . Vh ) ;
95
95
var renderDevice = new DefaultRenderDevice { ViewPortHeight = 1000 } ;
96
- Assert . AreEqual ( 100 , l . ToPixel ( renderDevice ) ) ;
96
+ Assert . AreEqual ( 100 , l . ToPixel ( renderDevice , RenderMode . Undefined ) ) ;
97
97
}
98
98
99
99
[ Test ]
100
100
public void LengthToPixelsCorrectVw ( )
101
101
{
102
102
var l = new Length ( 20 , Length . Unit . Vw ) ;
103
103
var renderDevice = new DefaultRenderDevice { ViewPortWidth = 1000 } ;
104
- Assert . AreEqual ( 200 , l . ToPixel ( renderDevice ) ) ;
104
+ Assert . AreEqual ( 200 , l . ToPixel ( renderDevice , RenderMode . Undefined ) ) ;
105
105
}
106
106
107
107
[ Test ]
@@ -113,7 +113,7 @@ public void LengthToPixelsCorrectVmax()
113
113
ViewPortHeight = 1000 ,
114
114
ViewPortWidth = 500
115
115
} ;
116
- Assert . AreEqual ( 200 , l . ToPixel ( renderDevice ) ) ;
116
+ Assert . AreEqual ( 200 , l . ToPixel ( renderDevice , RenderMode . Undefined ) ) ;
117
117
}
118
118
119
119
[ Test ]
@@ -125,55 +125,55 @@ public void LengthToPixelsCorrectVmin()
125
125
ViewPortHeight = 1000 ,
126
126
ViewPortWidth = 500
127
127
} ;
128
- Assert . AreEqual ( 100 , l . ToPixel ( renderDevice ) ) ;
128
+ Assert . AreEqual ( 100 , l . ToPixel ( renderDevice , RenderMode . Undefined ) ) ;
129
129
}
130
130
131
131
[ Test ]
132
132
public void LengthToPercentCorrectWidth ( )
133
133
{
134
134
var l = new Length ( 100 , Length . Unit . Px ) ;
135
135
var renderDevice = new DefaultRenderDevice { ViewPortWidth = 500 } ;
136
- Assert . AreEqual ( 20 , l . To ( Length . Unit . Percent , renderDevice , true ) ) ;
136
+ Assert . AreEqual ( 20 , l . To ( Length . Unit . Percent , renderDevice , RenderMode . Horizontal ) ) ;
137
137
}
138
138
139
139
[ Test ]
140
140
public void LengthToPercentCorrectHeight ( )
141
141
{
142
142
var l = new Length ( 100 , Length . Unit . Px ) ;
143
143
var renderDevice = new DefaultRenderDevice { ViewPortHeight = 1000 } ;
144
- Assert . AreEqual ( 10 , l . To ( Length . Unit . Percent , renderDevice , false ) ) ;
144
+ Assert . AreEqual ( 10 , l . To ( Length . Unit . Percent , renderDevice , RenderMode . Vertical ) ) ;
145
145
}
146
146
147
147
[ Test ]
148
148
public void LengthToRemCorrectValue ( )
149
149
{
150
150
var l = new Length ( 100 , Length . Unit . Px ) ;
151
151
var renderDevice = new DefaultRenderDevice { FontSize = 16 } ;
152
- Assert . AreEqual ( 6.25d , l . To ( Length . Unit . Rem , renderDevice ) ) ;
152
+ Assert . AreEqual ( 6.25d , l . To ( Length . Unit . Rem , renderDevice , RenderMode . Undefined ) ) ;
153
153
}
154
154
155
155
[ Test ]
156
156
public void LengthToEmCorrectValue ( )
157
157
{
158
158
var l = new Length ( 1600 , Length . Unit . Px ) ;
159
159
var renderDevice = new DefaultRenderDevice { FontSize = 16 } ;
160
- Assert . AreEqual ( 100 , l . To ( Length . Unit . Em , renderDevice ) ) ;
160
+ Assert . AreEqual ( 100 , l . To ( Length . Unit . Em , renderDevice , RenderMode . Undefined ) ) ;
161
161
}
162
162
163
163
[ Test ]
164
164
public void LengthToVhCorrectValue ( )
165
165
{
166
166
var l = new Length ( 100 , Length . Unit . Px ) ;
167
167
var renderDevice = new DefaultRenderDevice { ViewPortHeight = 1000 } ;
168
- Assert . AreEqual ( 10 , l . To ( Length . Unit . Vh , renderDevice ) ) ;
168
+ Assert . AreEqual ( 10 , l . To ( Length . Unit . Vh , renderDevice , RenderMode . Undefined ) ) ;
169
169
}
170
170
171
171
[ Test ]
172
172
public void LengthToVwCorrectValue ( )
173
173
{
174
174
var l = new Length ( 50 , Length . Unit . Px ) ;
175
175
var renderDevice = new DefaultRenderDevice { ViewPortWidth = 1000 } ;
176
- Assert . AreEqual ( 5 , l . To ( Length . Unit . Vw , renderDevice ) ) ;
176
+ Assert . AreEqual ( 5 , l . To ( Length . Unit . Vw , renderDevice , RenderMode . Undefined ) ) ;
177
177
}
178
178
179
179
[ Test ]
@@ -185,7 +185,7 @@ public void LengthToVmaxCorrectValue()
185
185
ViewPortWidth = 1000 ,
186
186
ViewPortHeight = 500
187
187
} ;
188
- Assert . AreEqual ( 5 , l . To ( Length . Unit . Vmax , renderDevice ) ) ;
188
+ Assert . AreEqual ( 5 , l . To ( Length . Unit . Vmax , renderDevice , RenderMode . Undefined ) ) ;
189
189
}
190
190
191
191
[ Test ]
@@ -197,7 +197,7 @@ public void LengthToVminCorrectValue()
197
197
ViewPortWidth = 1000 ,
198
198
ViewPortHeight = 500
199
199
} ;
200
- Assert . AreEqual ( 10 , l . To ( Length . Unit . Vmin , renderDevice ) ) ;
200
+ Assert . AreEqual ( 10 , l . To ( Length . Unit . Vmin , renderDevice , RenderMode . Undefined ) ) ;
201
201
}
202
202
203
203
[ Test ]
0 commit comments