コード例 #1
0
        public void l_imperialpint()
        {
            converter = new VolumeConverter("l", "imperial pint");
            double valL = 1;
            double valR = 1.75975;

            Assert.AreEqual(valR, converter.LeftToRight(valL));
            Assert.AreEqual(valL, converter.RightToLeft(valR));
        }
コード例 #2
0
        public void l_imperialgallon()
        {
            converter = new VolumeConverter("l", "imperial gallon");
            double valL = 1;
            double valR = 0.219969;

            Assert.AreEqual(valR, converter.LeftToRight(valL));
            Assert.AreEqual(valL, converter.RightToLeft(valR));
        }
コード例 #3
0
        public void l_ft3()
        {
            converter = new VolumeConverter("l", "ft3");
            double valL = 1;
            double valR = 0.0353147;

            Assert.AreEqual(valR, converter.LeftToRight(valL));
            Assert.AreEqual(valL, converter.RightToLeft(valR));
        }
コード例 #4
0
        public void l_in3()
        {
            converter = new VolumeConverter("l", "in3");
            double valL = 1;
            double valR = 61.0237;

            Assert.AreEqual(valR, converter.LeftToRight(valL));
            Assert.AreEqual(valL, converter.RightToLeft(valR));
        }
コード例 #5
0
        public void l_mm3()
        {
            converter = new VolumeConverter("l", "mm3");
            double valL = 1;
            double valR = 1000 * 1000;

            Assert.AreEqual(valR, converter.LeftToRight(valL));
            Assert.AreEqual(valL, converter.RightToLeft(valR));
        }
コード例 #6
0
        public void l_usquart()
        {
            converter = new VolumeConverter("l", "US quart");
            double valL = 1;
            double valR = 2.11338;

            Assert.AreEqual(valR, converter.LeftToRight(valL));
            Assert.AreEqual(valL, converter.RightToLeft(valR));
        }
コード例 #7
0
        public void l_usgallon()
        {
            converter = new VolumeConverter("l", "US gallon");
            double valL = 1;
            double valR = 0.264172;

            Assert.AreEqual(valR, converter.LeftToRight(valL));
            Assert.AreEqual(valL, converter.RightToLeft(valR));
        }
コード例 #8
0
        public void l_uspint()
        {
            converter = new VolumeConverter("l", "US pint");
            double valL = 1;
            double valR = 2.11337643513819;

            Assert.AreEqual(valR, converter.LeftToRight(valL));
            Assert.AreEqual(valL, converter.RightToLeft(valR));
        }
コード例 #9
0
        public void l_imperialquart()
        {
            converter = new VolumeConverter("l", "imperial quart");
            double valL = 1;
            double valR = 0.879877;

            Assert.AreEqual(valR, converter.LeftToRight(valL));
            Assert.AreEqual(valL, converter.RightToLeft(valR));
        }