示例#1
0
        public void implimentationForConversion()
        {
            ConversionForDistance conversion = new ConversionForDistance();
            double output = conversion.ConvertMethod(1.0, Distance.Meters, Distance.Meters);

            Assert.AreEqual(1.0, output);
        }
示例#2
0
        public void addition()
        {
            ConversionForDistance conversion = new ConversionForDistance();
            double output = conversion.Addition(2, Distance.Inches, 3, Distance.Inches);

            Assert.AreEqual(5.00, output, 0.01);
        }
示例#3
0
        public void giveninches_ShouldConvertCM()
        {
            ConversionForDistance conversion = new ConversionForDistance();
            double output = conversion.ConvertMethod(2, Distance.Inches, Distance.Centimeters);

            Assert.AreEqual(5.08, output, 0.01);
        }
示例#4
0
        public void given_ft_shouldReturnYD()
        {
            ConversionForDistance conversion = new ConversionForDistance();
            double output = conversion.ConvertMethod(3, Distance.Feet, Distance.Yards);

            Assert.AreEqual(1.00, output, 0.01);
        }
示例#5
0
        public void givenFeet_shouldRetruninch()
        {
            ConversionForDistance conversion = new ConversionForDistance();
            double output = conversion.ConvertMethod(1, Distance.Feet, Distance.Inches);

            Assert.AreEqual(12.00, output, 0.01);
        }
示例#6
0
        public void givenZeroFeet_shouldRetrunZeroFeet()
        {
            ConversionForDistance conversion = new ConversionForDistance();
            double output = conversion.ConvertMethod(0.0, Distance.Feet, Distance.Feet);

            Assert.AreEqual(0.0, output);
        }
示例#7
0
        public void InMaster()
        {
            ConversionForDistance conversion = new ConversionForDistance();
            double output = conversion.ConvertMethod(1.0, Distance.Meters, Distance.Meters);

            Assert.AreEqual(1.0, output);
        }