示例#1
0
        public void From_ValueAndUnit_ReturnsQuantityWithSameValueAndUnit()
        {
            var quantity00 = ElectricConductance.From(1, ElectricConductanceUnit.Microsiemens);

            AssertEx.EqualTolerance(1, quantity00.Microsiemens, MicrosiemensTolerance);
            Assert.Equal(ElectricConductanceUnit.Microsiemens, quantity00.Unit);

            var quantity01 = ElectricConductance.From(1, ElectricConductanceUnit.Millisiemens);

            AssertEx.EqualTolerance(1, quantity01.Millisiemens, MillisiemensTolerance);
            Assert.Equal(ElectricConductanceUnit.Millisiemens, quantity01.Unit);

            var quantity02 = ElectricConductance.From(1, ElectricConductanceUnit.Siemens);

            AssertEx.EqualTolerance(1, quantity02.Siemens, SiemensTolerance);
            Assert.Equal(ElectricConductanceUnit.Siemens, quantity02.Unit);
        }
示例#2
0
 public void FromValueAndUnit()
 {
     AssertEx.EqualTolerance(1, ElectricConductance.From(1, ElectricConductanceUnit.Microsiemens).Microsiemens, MicrosiemensTolerance);
     AssertEx.EqualTolerance(1, ElectricConductance.From(1, ElectricConductanceUnit.Millisiemens).Millisiemens, MillisiemensTolerance);
     AssertEx.EqualTolerance(1, ElectricConductance.From(1, ElectricConductanceUnit.Siemens).Siemens, SiemensTolerance);
 }