Skip to content

Commit a3cd55e

Browse files
committed
Implement constants for tests
Fixes intentional compile error by generated code for new units, which ensures all units have tests.
1 parent 8830116 commit a3cd55e

File tree

1 file changed

+39
-1
lines changed

1 file changed

+39
-1
lines changed

Tests/CustomCode/InformationTests.cs

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,44 @@ namespace UnitsNet.Tests.CustomCode
2626
{
2727
public class InformationTests : InformationTestsBase
2828
{
29-
// TODO Override properties in base class here
29+
protected override double BitsInOneBit
30+
{
31+
get { return 1; }
32+
}
33+
34+
protected override double BytesInOneBit
35+
{
36+
get { return 0.125; }
37+
}
38+
39+
protected override double ExabytesInOneBit
40+
{
41+
get { return 0.125*1e-18; }
42+
}
43+
44+
protected override double GigabytesInOneBit
45+
{
46+
get { return 0.125*1e-9; }
47+
}
48+
49+
protected override double KilobytesInOneBit
50+
{
51+
get { return 0.000125; }
52+
}
53+
54+
protected override double MegabytesInOneBit
55+
{
56+
get { return 0.125*1e-6; }
57+
}
58+
59+
protected override double PetabytesInOneBit
60+
{
61+
get { return 0.125*1e-15; }
62+
}
63+
64+
protected override double TerabytesInOneBit
65+
{
66+
get { return 0.125*1e-12; }
67+
}
3068
}
3169
}

0 commit comments

Comments
 (0)