@@ -20,7 +20,9 @@ private void IgnoreIfNotSupported(string function)
20
20
protected override void OnSetUp ( )
21
21
{
22
22
base . OnSetUp ( ) ;
23
- _orderLines = db . OrderLines . Take ( 10 ) . ToList ( ) . AsQueryable ( ) ;
23
+ _orderLines = db . OrderLines
24
+ . OrderBy ( ol => ol . Id )
25
+ . Take ( 10 ) . ToList ( ) . AsQueryable ( ) ;
24
26
}
25
27
26
28
[ Test ]
@@ -47,70 +49,70 @@ public void SignAllNegativeTest()
47
49
public void SinTest ( )
48
50
{
49
51
IgnoreIfNotSupported ( "sin" ) ;
50
- Test ( o => Math . Sin ( ( double ) o . UnitPrice ) ) ;
52
+ Test ( o => Math . Round ( Math . Sin ( ( double ) o . UnitPrice ) , 5 ) ) ;
51
53
}
52
54
53
55
[ Test ]
54
56
public void CosTest ( )
55
57
{
56
58
IgnoreIfNotSupported ( "cos" ) ;
57
- Test ( o => Math . Cos ( ( double ) o . UnitPrice ) ) ;
59
+ Test ( o => Math . Round ( Math . Cos ( ( double ) o . UnitPrice ) , 5 ) ) ;
58
60
}
59
61
60
62
[ Test ]
61
63
public void TanTest ( )
62
64
{
63
65
IgnoreIfNotSupported ( "tan" ) ;
64
- Test ( o => Math . Tan ( ( double ) o . Discount ) ) ;
66
+ Test ( o => Math . Round ( Math . Tan ( ( double ) o . Discount ) , 5 ) ) ;
65
67
}
66
68
67
69
[ Test ]
68
70
public void SinhTest ( )
69
71
{
70
72
IgnoreIfNotSupported ( "sinh" ) ;
71
- Test ( o => Math . Sinh ( ( double ) o . Discount ) ) ;
73
+ Test ( o => Math . Round ( Math . Sinh ( ( double ) o . Discount ) , 5 ) ) ;
72
74
}
73
75
74
76
[ Test ]
75
77
public void CoshTest ( )
76
78
{
77
79
IgnoreIfNotSupported ( "cosh" ) ;
78
- Test ( o => Math . Cosh ( ( double ) o . Discount ) ) ;
80
+ Test ( o => Math . Round ( Math . Cosh ( ( double ) o . Discount ) , 5 ) ) ;
79
81
}
80
82
81
83
[ Test ]
82
84
public void TanhTest ( )
83
85
{
84
86
IgnoreIfNotSupported ( "tanh" ) ;
85
- Test ( o => Math . Tanh ( ( double ) o . Discount ) ) ;
87
+ Test ( o => Math . Round ( Math . Tanh ( ( double ) o . Discount ) , 5 ) ) ;
86
88
}
87
89
88
90
[ Test ]
89
91
public void AsinTest ( )
90
92
{
91
93
IgnoreIfNotSupported ( "asin" ) ;
92
- Test ( o => Math . Asin ( ( double ) o . Discount ) ) ;
94
+ Test ( o => Math . Round ( Math . Asin ( ( double ) o . Discount ) , 5 ) ) ;
93
95
}
94
96
95
97
[ Test ]
96
98
public void AcosTest ( )
97
99
{
98
100
IgnoreIfNotSupported ( "acos" ) ;
99
- Test ( o => Math . Acos ( ( double ) o . Discount ) ) ;
101
+ Test ( o => Math . Round ( Math . Acos ( ( double ) o . Discount ) , 5 ) ) ;
100
102
}
101
103
102
104
[ Test ]
103
105
public void AtanTest ( )
104
106
{
105
107
IgnoreIfNotSupported ( "atan" ) ;
106
- Test ( o => Math . Atan ( ( double ) o . UnitPrice ) ) ;
108
+ Test ( o => Math . Round ( Math . Atan ( ( double ) o . UnitPrice ) , 5 ) ) ;
107
109
}
108
110
109
111
[ Test ]
110
112
public void Atan2Test ( )
111
113
{
112
114
IgnoreIfNotSupported ( "atan2" ) ;
113
- Test ( o => Math . Atan2 ( ( double ) o . Discount , 0.5d ) ) ;
115
+ Test ( o => Math . Round ( Math . Atan2 ( ( double ) o . Discount , 0.5d ) , 5 ) ) ;
114
116
}
115
117
116
118
private void Test ( Expression < Func < OrderLine , double > > selector )
@@ -119,7 +121,9 @@ private void Test(Expression<Func<OrderLine, double>> selector)
119
121
. Select ( selector )
120
122
. ToList ( ) ;
121
123
122
- var actual = db . OrderLines . Select ( selector )
124
+ var actual = db . OrderLines
125
+ . OrderBy ( ol => ol . Id )
126
+ . Select ( selector )
123
127
. Take ( 10 )
124
128
. ToList ( ) ;
125
129
0 commit comments