Exemplo n.º 1
0
        public void DivideOperator_DivideByItself_ReturnsUnityDoublet()
        {
            var expected = new StandardMeasureDoublet <Number, Number>(1.0, 1.0);
            var actual   = _instance / _instance;

            IMeasureDoubletAssert.AreEqual(expected, actual);
        }
Exemplo n.º 2
0
        public void DivideOperator_DivideBy2And3_ReturnsHalfTimeOneThirdPower()
        {
            var expected = new StandardMeasureDoublet <Time, Power>(2.5, 0.04);
            var actual   = _instance / new StandardMeasureDoublet <Number, Number>(2.0, 3.0);

            IMeasureDoubletAssert.AreEqual(expected, actual);
        }
Exemplo n.º 3
0
        public void TimesOperator_MultiplyBy2And3_ReturnsDoubleTimeThreeTimesPower()
        {
            var expected = new StandardMeasureDoublet <Time, Power>(10.0, 0.36);
            var actual   = _instance * new StandardMeasureDoublet <Number, Number>(2.0, 3.0);

            IMeasureDoubletAssert.AreEqual(expected, actual);
        }
Exemplo n.º 4
0
        public void MinusOperator_SubtractInstanceWithItself_ReturnsZero()
        {
            var expected = new StandardMeasureDoublet <Time, Power>(0.0, 0.0);
            var actual   = _instance - _instance;

            IMeasureDoubletAssert.AreEqual(expected, actual);
        }
Exemplo n.º 5
0
        public void PlusOperator_AddInstanceWithItself_ReturnsDoubleInstance()
        {
            var expected = new StandardMeasureDoublet <Time, Power>(10.0, 0.24);
            var actual   = _instance + _instance;

            IMeasureDoubletAssert.AreEqual(expected, actual);
        }
Exemplo n.º 6
0
 public void Setup()
 {
     _instance = new StandardMeasureDoublet <Time, Power>(5.0, 0.12);
 }