Beispiel #1
0
        public void Conversion(ConversionData data)
        {
            var m1 = Mass.Parse(data.From, CultureInfo.InvariantCulture);
            var m2 = Mass.Parse(data.To, CultureInfo.InvariantCulture);

            if (data.Exactly)
            {
                Assert.AreEqual(m1, m2);
            }
            else
            {
                Assert.AreEqual(m1.ToString(), m2.ToString());
            }
        }
Beispiel #2
0
        public void Conversion(ConversionData data)
        {
            if (data.Status == ConversionData.GenerationStatus.NotGenerated)
            {
                Assert.Inconclusive(data.ToString());
            }

            var t1 = Temperature.Parse(data.From, CultureInfo.InvariantCulture);
            var t2 = Temperature.Parse(data.To, CultureInfo.InvariantCulture);

            if (data.Exactly)
            {
                Assert.AreEqual(t1, t2);
            }
            else
            {
                Assert.AreEqual(t1.ToString(), t2.ToString());
            }
        }
Beispiel #3
0
        public void Conversion(ConversionData data)
        {
            if (data.Status == ConversionData.GenerationStatus.NotGenerated)
            {
                Assert.Inconclusive(data.ToString());
            }

            var l1 = Length.Parse(data.From, CultureInfo.InvariantCulture);
            var l2 = Length.Parse(data.To, CultureInfo.InvariantCulture);

            if (data.Exactly)
            {
                Assert.AreEqual(l1, l2);
            }
            else
            {
                Assert.AreEqual(l1.ToString(), l2.ToString());
            }
        }