Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 82 additions & 0 deletions UnitsNet.Tests/CustomCode/BitRateTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated (once) by \generate-code.bat, but will not be
// regenerated when it already exists. The purpose of creating this file is to make
// it easier to remember to implement all the unit conversion test cases.
//
// Whenever a new unit is added to this quantity and \generate-code.bat is run,
// the base test class will get a new abstract property and cause a compile error
// in this derived class, reminding the developer to implement the test case
// for the new unit.
//
// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
//
// Add CustomCode\Quantities\MyUnit.extra.cs files to add code to generated quantities.
// Add Extensions\MyUnitExtensions.cs to decorate quantities with new behavior.
// Add UnitDefinitions\MyUnit.json and run GeneratUnits.bat to generate new units or quantities.
//
// </auto-generated>
//------------------------------------------------------------------------------

// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com).
// https://github.com/angularsen/UnitsNet
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.


using System;

namespace UnitsNet.Tests.CustomCode
{
public class BitRateTests : BitRateTestsBase
{
protected override double BitsPerSecondInOneBitPerSecond => 1d;
protected override double BytesPerSecondInOneBitPerSecond => 1.25E-1d;

protected override double KilobitsPerSecondInOneBitPerSecond => 1E-3d;
protected override double KilobytesPerSecondInOneBitPerSecond => 1.25E-4d;
protected override double KibibitsPerSecondInOneBitPerSecond => 0.0009765625d;
protected override double KibibytesPerSecondInOneBitPerSecond => 0.0001220703125d;

protected override double MegabitsPerSecondInOneBitPerSecond => 1E-6d;
protected override double MegabytesPerSecondInOneBitPerSecond => 1.25E-07d;
protected override double MebibitsPerSecondInOneBitPerSecond => 9.5367431640625E-07d;
protected override double MebibytesPerSecondInOneBitPerSecond => 1.19209289550781E-07d;

protected override double GigabitsPerSecondInOneBitPerSecond => 1E-9d;
protected override double GigabytesPerSecondInOneBitPerSecond => 1.25E-10d;
protected override double GibibitsPerSecondInOneBitPerSecond => 9.31322574615479E-10d;
protected override double GibibytesPerSecondInOneBitPerSecond => 1.16415321826935E-10d;

protected override double TerabitsPerSecondInOneBitPerSecond => 1E-12d;
protected override double TerabytesPerSecondInOneBitPerSecond => 1.25E-13d;
protected override double TebibitsPerSecondInOneBitPerSecond => 9.09494701772928E-13d;
protected override double TebibytesPerSecondInOneBitPerSecond => 1.13686837721616E-13d;

protected override double PetabitsPerSecondInOneBitPerSecond => 1E-15d;
protected override double PetabytesPerSecondInOneBitPerSecond => 1.25E-16d;
protected override double PebibitsPerSecondInOneBitPerSecond => 8.88178419700125E-16d;
protected override double PebibytesPerSecondInOneBitPerSecond => 1.11022302462516E-16d;

protected override double ExabitsPerSecondInOneBitPerSecond => 1E-18d;
protected override double ExabytesPerSecondInOneBitPerSecond => 1.25E-19d;
protected override double ExbibitsPerSecondInOneBitPerSecond => 8.67361738E-19d;
protected override double ExbibytesPerSecondInOneBitPerSecond => 1.0842021724855E-19d;
}
}
Loading