Skip to content

Commit 09bf7fa

Browse files
authored
Merge pull request #448 from tmilnthorp/PowerDensity
Add PowerDensity units
2 parents 3c6e4ed + d90d2aa commit 09bf7fa

File tree

8 files changed

+4765
-0
lines changed

8 files changed

+4765
-0
lines changed
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
//------------------------------------------------------------------------------
2+
// <auto-generated>
3+
// This code was generated (once) by \generate-code.bat, but will not be
4+
// regenerated when it already exists. The purpose of creating this file is to make
5+
// it easier to remember to implement all the unit conversion test cases.
6+
//
7+
// Whenever a new unit is added to this quantity and \generate-code.bat is run,
8+
// the base test class will get a new abstract property and cause a compile error
9+
// in this derived class, reminding the developer to implement the test case
10+
// for the new unit.
11+
//
12+
// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
13+
//
14+
// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
15+
// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior.
16+
// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities.
17+
//
18+
// </auto-generated>
19+
//------------------------------------------------------------------------------
20+
21+
// Copyright (c) 2013 Andreas Gullberg Larsen ([email protected]).
22+
// https://github.com/angularsen/UnitsNet
23+
//
24+
// Permission is hereby granted, free of charge, to any person obtaining a copy
25+
// of this software and associated documentation files (the "Software"), to deal
26+
// in the Software without restriction, including without limitation the rights
27+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
28+
// copies of the Software, and to permit persons to whom the Software is
29+
// furnished to do so, subject to the following conditions:
30+
//
31+
// The above copyright notice and this permission notice shall be included in
32+
// all copies or substantial portions of the Software.
33+
//
34+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
35+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
36+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
37+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
38+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
39+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
40+
// THE SOFTWARE.
41+
42+
43+
using System;
44+
45+
namespace UnitsNet.Tests.CustomCode
46+
{
47+
public class PowerDensityTests : PowerDensityTestsBase
48+
{
49+
protected override double WattsPerCubicMeterInOneWattPerCubicMeter => 1;
50+
protected override double PicowattsPerCubicMeterInOneWattPerCubicMeter => 1e12;
51+
protected override double NanowattsPerCubicMeterInOneWattPerCubicMeter => 1e9;
52+
protected override double MicrowattsPerCubicMeterInOneWattPerCubicMeter => 1e6;
53+
protected override double MilliwattsPerCubicMeterInOneWattPerCubicMeter => 1e3;
54+
protected override double DeciwattsPerCubicMeterInOneWattPerCubicMeter => 1e1;
55+
protected override double DecawattsPerCubicMeterInOneWattPerCubicMeter => 1e-1;
56+
protected override double KilowattsPerCubicMeterInOneWattPerCubicMeter => 1e-3;
57+
protected override double MegawattsPerCubicMeterInOneWattPerCubicMeter => 1e-6;
58+
protected override double GigawattsPerCubicMeterInOneWattPerCubicMeter => 1e-9;
59+
protected override double TerawattsPerCubicMeterInOneWattPerCubicMeter => 1e-12;
60+
61+
protected override double WattsPerCubicInchInOneWattPerCubicMeter => 1.6387064e-5;
62+
protected override double PicowattsPerCubicInchInOneWattPerCubicMeter => 1.6387064e7;
63+
protected override double NanowattsPerCubicInchInOneWattPerCubicMeter => 1.6387064e4;
64+
protected override double MicrowattsPerCubicInchInOneWattPerCubicMeter => 1.6387064e1;
65+
protected override double MilliwattsPerCubicInchInOneWattPerCubicMeter => 1.6387064e-2;
66+
protected override double DeciwattsPerCubicInchInOneWattPerCubicMeter => 1.6387064e-4;
67+
protected override double DecawattsPerCubicInchInOneWattPerCubicMeter => 1.6387064e-6;
68+
protected override double KilowattsPerCubicInchInOneWattPerCubicMeter => 1.6387064e-8;
69+
protected override double MegawattsPerCubicInchInOneWattPerCubicMeter => 1.6387064e-11;
70+
protected override double GigawattsPerCubicInchInOneWattPerCubicMeter => 1.6387064e-14;
71+
protected override double TerawattsPerCubicInchInOneWattPerCubicMeter => 1.6387064e-17;
72+
73+
protected override double WattsPerCubicFootInOneWattPerCubicMeter => 2.8316846592e-2;
74+
protected override double PicowattsPerCubicFootInOneWattPerCubicMeter => 2.8316846592e10;
75+
protected override double NanowattsPerCubicFootInOneWattPerCubicMeter => 2.8316846592e7;
76+
protected override double MicrowattsPerCubicFootInOneWattPerCubicMeter => 2.8316846592e4;
77+
protected override double MilliwattsPerCubicFootInOneWattPerCubicMeter => 2.8316846592e1;
78+
protected override double DeciwattsPerCubicFootInOneWattPerCubicMeter => 2.8316846592e-1;
79+
protected override double DecawattsPerCubicFootInOneWattPerCubicMeter => 2.8316846592e-3;
80+
protected override double KilowattsPerCubicFootInOneWattPerCubicMeter => 2.8316846592e-5;
81+
protected override double MegawattsPerCubicFootInOneWattPerCubicMeter => 2.8316846592e-8;
82+
protected override double GigawattsPerCubicFootInOneWattPerCubicMeter => 2.8316846592e-11;
83+
protected override double TerawattsPerCubicFootInOneWattPerCubicMeter => 2.8316846592e-14;
84+
85+
protected override double WattsPerLiterInOneWattPerCubicMeter => 1.0e-3;
86+
protected override double PicowattsPerLiterInOneWattPerCubicMeter => 1e9;
87+
protected override double NanowattsPerLiterInOneWattPerCubicMeter => 1e6;
88+
protected override double MicrowattsPerLiterInOneWattPerCubicMeter => 1e3;
89+
protected override double MilliwattsPerLiterInOneWattPerCubicMeter => 1;
90+
protected override double DeciwattsPerLiterInOneWattPerCubicMeter => 1e-2;
91+
protected override double DecawattsPerLiterInOneWattPerCubicMeter => 1e-4;
92+
protected override double KilowattsPerLiterInOneWattPerCubicMeter => 1e-6;
93+
protected override double MegawattsPerLiterInOneWattPerCubicMeter => 1e-9;
94+
protected override double GigawattsPerLiterInOneWattPerCubicMeter => 1e-12;
95+
protected override double TerawattsPerLiterInOneWattPerCubicMeter => 1e-15;
96+
}
97+
}

0 commit comments

Comments
 (0)