annotate UnitTests/Linq/MathFunctions.cs @ 8:a34cfdde80d6

removed strong signing added FrameworkPathOverride for linux builds
author cin
date Wed, 29 Nov 2017 12:43:52 +0300
parents f990fcb411a9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
1 using System;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
2 using System.Linq;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
3 using BLToolkit.Data.Linq;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
4 using NUnit.Framework;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
5
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
6 using BLToolkit.Data.DataProvider;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
7
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
8 namespace Data.Linq
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
9 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
10 [TestFixture]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
11 public class MathFunctions : TestBase
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
12 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
13 [Test]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
14 public void Abs()
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
15 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
16 ForEachProvider(db => AreEqual(
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
17 from t in from p in Types select Math.Abs(p.MoneyValue) where t > 0 select t,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
18 from t in from p in db.Types select Math.Abs(p.MoneyValue) where t > 0 select t));
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
19 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
20
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
21 [Test]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
22 public void Acos()
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
23 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
24 ForEachProvider(new[] { ProviderName.Access }, db => AreEqual(
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
25 from t in from p in Types select Math.Floor(Math.Acos((double)p.MoneyValue / 15) * 15) where t != 0.1 select t,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
26 from t in from p in db.Types select Math.Floor(Math.Acos((double)p.MoneyValue / 15) * 15) where t != 0.1 select t));
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
27 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
28
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
29 [Test]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
30 public void Asin()
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
31 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
32 ForEachProvider(new[] { ProviderName.Access }, db => AreEqual(
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
33 from t in from p in Types select Math.Floor(Math.Asin((double)p.MoneyValue / 15) * 15) where t != 0.1 select t,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
34 from t in from p in db.Types select Math.Floor(Math.Asin((double)p.MoneyValue / 15) * 15) where t != 0.1 select t));
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
35 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
36
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
37 [Test]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
38 public void Atan()
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
39 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
40 ForEachProvider(db => AreEqual(
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
41 from t in from p in Types select Math.Floor(Math.Atan((double)p.MoneyValue / 15) * 15) where t != 0.1 select t,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
42 from t in from p in db.Types select Math.Floor(Math.Atan((double)p.MoneyValue / 15) * 15) where t != 0.1 select t));
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
43 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
44
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
45 [Test]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
46 public void Atan2()
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
47 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
48 ForEachProvider(new[] { ProviderName.Access }, db => AreEqual(
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
49 from t in from p in Types select Math.Floor(Math.Atan2((double)p.MoneyValue / 15, 0) * 15) where t != 0.1 select t,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
50 from t in from p in db.Types select Math.Floor(Math.Atan2((double)p.MoneyValue / 15, 0) * 15) where t != 0.1 select t));
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
51 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
52
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
53 [Test]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
54 public void Ceiling1()
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
55 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
56 ForEachProvider(db => AreEqual(
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
57 from t in from p in Types select Math.Ceiling(-(p.MoneyValue + 1)) where t != 0 select t,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
58 from t in from p in db.Types select Math.Ceiling(-(p.MoneyValue + 1)) where t != 0 select t));
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
59 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
60
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
61 [Test]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
62 public void Ceiling2()
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
63 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
64 ForEachProvider(db => AreEqual(
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
65 from t in from p in Types select Math.Ceiling(p.MoneyValue) where t != 0 select t,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
66 from t in from p in db.Types select Math.Ceiling(p.MoneyValue) where t != 0 select t));
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
67 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
68
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
69 [Test]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
70 public void Cos()
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
71 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
72 ForEachProvider(db => AreEqual(
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
73 from t in from p in Types select Math.Floor(Math.Cos((double)p.MoneyValue / 15) * 15) where t != 0.1 select t,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
74 from t in from p in db.Types select Math.Floor(Math.Cos((double)p.MoneyValue / 15) * 15) where t != 0.1 select t));
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
75 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
76
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
77 [Test]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
78 public void Cosh()
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
79 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
80 ForEachProvider(db => AreEqual(
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
81 from t in from p in Types select Math.Floor(Math.Cosh((double)p.MoneyValue / 15) * 15) where t != 0.1 select t,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
82 from t in from p in db.Types select Math.Floor(Math.Cosh((double)p.MoneyValue / 15) * 15) where t != 0.1 select t));
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
83 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
84
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
85 [Test]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
86 public void Cot()
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
87 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
88 ForEachProvider(db => AreEqual(
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
89 from t in from p in Types select Math.Floor(Sql.Cot((double)p.MoneyValue / 15).Value * 15) where t != 0.1 select t,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
90 from t in from p in db.Types select Math.Floor(Sql.Cot((double)p.MoneyValue / 15).Value * 15) where t != 0.1 select t));
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
91 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
92
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
93 [Test]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
94 public void Deegrees1()
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
95 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
96 ForEachProvider(db => AreEqual(
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
97 from t in from p in Types select Math.Floor(Sql.Degrees(p.MoneyValue).Value) where t != 0.1m select t,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
98 from t in from p in db.Types select Math.Floor(Sql.Degrees(p.MoneyValue).Value) where t != 0.1m select t));
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
99 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
100
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
101 [Test]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
102 public void Deegrees2()
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
103 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
104 ForEachProvider(db => AreEqual(
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
105 from t in from p in Types select Sql.Degrees((double)p.MoneyValue).Value where t != 0.1 select Math.Floor(t),
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
106 from t in from p in db.Types select Sql.Degrees((double)p.MoneyValue).Value where t != 0.1 select Math.Floor(t)));
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
107 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
108
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
109 [Test]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
110 public void Deegrees3()
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
111 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
112 ForEachProvider(db => AreEqual(
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
113 from t in from p in Types select Sql.Degrees((int)p.MoneyValue).Value where t != 0.1 select t,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
114 from t in from p in db.Types select Sql.Degrees((int)p.MoneyValue).Value where t != 0.1 select t));
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
115 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
116
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
117 [Test]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
118 public void Exp()
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
119 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
120 ForEachProvider(db => AreEqual(
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
121 from t in from p in Types select Math.Floor(Math.Exp((double)p.MoneyValue)) where t != 0.1 select t,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
122 from t in from p in db.Types select Math.Floor(Math.Exp((double)p.MoneyValue)) where t != 0.1 select t));
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
123 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
124
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
125 [Test]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
126 public void Floor()
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
127 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
128 ForEachProvider(db => AreEqual(
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
129 from t in from p in Types select Math.Floor(-(p.MoneyValue + 1)) where t != 0 select t,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
130 from t in from p in db.Types select Math.Floor(-(p.MoneyValue + 1)) where t != 0 select t));
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
131 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
132
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
133 [Test]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
134 public void Log()
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
135 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
136 ForEachProvider(db => AreEqual(
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
137 from t in from p in Types select Math.Floor(Math.Log((double)p.MoneyValue)) where t != 0.1 select t,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
138 from t in from p in db.Types select Math.Floor(Math.Log((double)p.MoneyValue)) where t != 0.1 select t));
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
139 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
140
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
141 [Test]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
142 public void Log2()
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
143 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
144 ForEachProvider(db => AreEqual(
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
145 from t in from p in Types select Math.Floor(Math.Log((double)p.MoneyValue, 2)) where t != 0.1 select t,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
146 from t in from p in db.Types select Math.Floor(Math.Log((double)p.MoneyValue, 2)) where t != 0.1 select t));
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
147 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
148
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
149 [Test]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
150 public void Log10()
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
151 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
152 ForEachProvider(db => AreEqual(
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
153 from t in from p in Types select Math.Floor(Math.Log10((double)p.MoneyValue)) where t != 0.1 select t,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
154 from t in from p in db.Types select Math.Floor(Math.Log10((double)p.MoneyValue)) where t != 0.1 select t));
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
155 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
156
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
157 [Test]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
158 public void Max()
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
159 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
160 ForEachProvider(db => AreEqual(
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
161 from t in from p in Types select Math.Max(p.MoneyValue, 5) where t != 0 select t,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
162 from t in from p in db.Types select Math.Max(p.MoneyValue, 5) where t != 0 select t));
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
163 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
164
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
165 [Test]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
166 public void Min()
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
167 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
168 ForEachProvider(db => AreEqual(
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
169 from t in from p in Types select Math.Min(p.MoneyValue, 5) where t != 0 select t,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
170 from t in from p in db.Types select Math.Min(p.MoneyValue, 5) where t != 0 select t));
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
171 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
172
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
173 [Test]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
174 public void Pow()
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
175 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
176 ForEachProvider(db => AreEqual(
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
177 from t in from p in Types select Math.Floor(Math.Pow((double)p.MoneyValue, 3)) where t != 0 select t,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
178 from t in from p in db.Types select Math.Floor(Math.Pow((double)p.MoneyValue, 3)) where t != 0 select t));
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
179 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
180
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
181 [Test]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
182 public void Round1()
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
183 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
184 ForEachProvider(db => AreEqual(
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
185 from t in from p in Types select Math.Round(p.MoneyValue) where t != 0 select t,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
186 from t in from p in db.Types select Math.Round(p.MoneyValue) where t != 0 select t));
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
187 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
188
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
189 [Test]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
190 public void Round2()
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
191 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
192 ForEachProvider(db => AreEqual(
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
193 from t in from p in Types select Math.Round((double)p.MoneyValue) where t != 0 select t,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
194 from t in from p in db.Types select Math.Round((double)p.MoneyValue) where t != 0 select t));
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
195 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
196
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
197 [Test]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
198 public void Round3()
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
199 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
200 ForEachProvider(db => AreEqual(
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
201 from t in from p in Types select Math.Round(p.MoneyValue, 1) where t != 0 && t != 7 select t,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
202 from t in from p in db.Types select Math.Round(p.MoneyValue, 1) where t != 0 && t != 7 select t));
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
203 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
204
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
205 [Test]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
206 public void Round4()
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
207 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
208 ForEachProvider(db => AreEqual(
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
209 from t in from p in Types select Math.Round((double)p.MoneyValue, 1) where t != 0 select Math.Round(t, 5),
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
210 from t in from p in db.Types select Math.Round((double)p.MoneyValue, 1) where t != 0 select Math.Round(t, 5)));
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
211 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
212
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
213 [Test]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
214 public void Round5()
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
215 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
216 ForEachProvider(db => AreEqual(
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
217 from t in from p in Types select Math.Round(p.MoneyValue, MidpointRounding.AwayFromZero) where t != 0 select t,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
218 from t in from p in db.Types select Math.Round(p.MoneyValue, MidpointRounding.AwayFromZero) where t != 0 select t));
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
219 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
220
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
221 [Test]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
222 public void Round6()
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
223 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
224 ForEachProvider(db => AreEqual(
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
225 from t in from p in Types select Math.Round((double)p.MoneyValue, MidpointRounding.AwayFromZero) where t != 0 select t,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
226 from t in from p in db.Types select Math.Round((double)p.MoneyValue, MidpointRounding.AwayFromZero) where t != 0 select t));
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
227 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
228
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
229 [Test]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
230 public void Round7()
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
231 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
232 ForEachProvider(db => AreEqual(
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
233 from t in from p in Types select Math.Round(p.MoneyValue, MidpointRounding.ToEven) where t != 0 select t,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
234 from t in from p in db.Types select Math.Round(p.MoneyValue, MidpointRounding.ToEven) where t != 0 select t));
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
235 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
236
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
237 [Test]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
238 public void Round8()
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
239 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
240 ForEachProvider(db => AreEqual(
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
241 from t in from p in Types select Math.Round((double)p.MoneyValue, MidpointRounding.ToEven) where t != 0 select t,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
242 from t in from p in db.Types select Math.Round((double)p.MoneyValue, MidpointRounding.ToEven) where t != 0 select t));
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
243 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
244
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
245 [Test]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
246 public void Round9()
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
247 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
248 ForEachProvider(new[] { ProviderName.SQLite }, db => AreEqual(
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
249 from t in from p in Types select Math.Round(p.MoneyValue, 1, MidpointRounding.AwayFromZero) where t != 0 select t,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
250 from t in from p in db.Types select Math.Round(p.MoneyValue, 1, MidpointRounding.AwayFromZero) where t != 0 select t));
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
251 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
252
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
253 [Test]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
254 public void Round10()
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
255 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
256 ForEachProvider(db => AreEqual(
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
257 from t in from p in Types select Math.Round(p.MoneyValue, 1, MidpointRounding.ToEven) where t != 0 && t != 7 select t,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
258 from t in from p in db.Types select Math.Round(p.MoneyValue, 1, MidpointRounding.ToEven) where t != 0 && t != 7 select t));
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
259 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
260
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
261 [Test]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
262 public void Round11()
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
263 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
264 ForEachProvider(db => AreEqual(
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
265 from t in from p in Types select Math.Round((double)p.MoneyValue, 1, MidpointRounding.ToEven) where t != 0 select Math.Round(t, 5),
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
266 from t in from p in db.Types select Math.Round((double)p.MoneyValue, 1, MidpointRounding.ToEven) where t != 0 select Math.Round(t, 5)));
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
267 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
268
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
269 [Test]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
270 public void Round12()
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
271 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
272 var mp = MidpointRounding.AwayFromZero;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
273
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
274 ForEachProvider(new[] { ProviderName.SQLite }, db => AreEqual(
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
275 from t in from p in Types select Math.Round(p.MoneyValue, 1, mp) where t != 0 && t != 7 select t,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
276 from t in from p in db.Types select Math.Round(p.MoneyValue, 1, mp) where t != 0 && t != 7 select t));
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
277 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
278
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
279 [Test]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
280 public void Sign()
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
281 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
282 ForEachProvider(db => AreEqual(
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
283 from t in from p in Types select Math.Sign(p.MoneyValue) where t != 0 select t,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
284 from t in from p in db.Types select Math.Sign(p.MoneyValue) where t != 0 select t));
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
285 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
286
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
287 [Test]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
288 public void Sin()
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
289 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
290 ForEachProvider(db => AreEqual(
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
291 from t in from p in Types select Math.Floor(Math.Sin((double)p.MoneyValue / 15) * 15) where t != 0.1 select t,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
292 from t in from p in db.Types select Math.Floor(Math.Sin((double)p.MoneyValue / 15) * 15) where t != 0.1 select t));
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
293 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
294
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
295 [Test]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
296 public void Sinh()
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
297 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
298 ForEachProvider(db => AreEqual(
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
299 from t in from p in Types select Math.Floor(Math.Sinh((double)p.MoneyValue / 15) * 15) where t != 0.1 select t,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
300 from t in from p in db.Types select Math.Floor(Math.Sinh((double)p.MoneyValue / 15) * 15) where t != 0.1 select t));
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
301 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
302
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
303 [Test]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
304 public void Sqrt()
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
305 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
306 ForEachProvider(db => AreEqual(
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
307 from t in from p in Types select Math.Floor(Math.Sqrt((double)p.MoneyValue / 15) * 15) where t != 0.1 select t,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
308 from t in from p in db.Types select Math.Floor(Math.Sqrt((double)p.MoneyValue / 15) * 15) where t != 0.1 select t));
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
309 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
310
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
311 [Test]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
312 public void Tan()
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
313 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
314 ForEachProvider(db => AreEqual(
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
315 from t in from p in Types select Math.Floor(Math.Tan((double)p.MoneyValue / 15) * 15) where t != 0.1 select t,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
316 from t in from p in db.Types select Math.Floor(Math.Tan((double)p.MoneyValue / 15) * 15) where t != 0.1 select t));
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
317 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
318
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
319 [Test]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
320 public void Tanh()
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
321 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
322 ForEachProvider(db => AreEqual(
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
323 from t in from p in Types select Math.Floor(Math.Tanh((double)p.MoneyValue / 15) * 15) where t != 0.1 select t,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
324 from t in from p in db.Types select Math.Floor(Math.Tanh((double)p.MoneyValue / 15) * 15) where t != 0.1 select t));
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
325 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
326
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
327 [Test]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
328 public void Truncate1()
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
329 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
330 ForEachProvider(db => AreEqual(
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
331 from t in from p in Types select Math.Truncate(p.MoneyValue) where t != 0.1m select t,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
332 from t in from p in db.Types select Math.Truncate(p.MoneyValue) where t != 0.1m select t));
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
333 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
334
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
335 [Test]
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
336 public void Truncate2()
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
337 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
338 ForEachProvider(db => AreEqual(
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
339 from t in from p in Types select Math.Truncate((double)-p.MoneyValue) where t != 0.1 select t,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
340 from t in from p in db.Types select Math.Truncate((double)-p.MoneyValue) where t != 0.1 select t));
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
341 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
342 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
343 }