Exemplo n.º 1
0
        public void ConverterItemSourceCount()
        {
            var converter = new DynamoConverter() { SelectedMetricConversion = ConversionMetricUnit.Volume };
            Assert.NotNull(converter);

            Assert.AreEqual("8", ((dynamic)converter.SelectedFromConversionSource).Count.ToString());
            Assert.AreEqual("8", ((dynamic)converter.SelectedToConversionSource).Count.ToString());
        }
Exemplo n.º 2
0
        public void ConverterDefaultValues()
        {
            var converter = new DynamoConverter();
            Assert.NotNull(converter);

            Assert.AreEqual(ConversionMetricUnit.Length, converter.SelectedMetricConversion);
            Assert.AreEqual(ConversionUnit.Meters, converter.SelectedFromConversion);
            Assert.AreEqual(ConversionUnit.Meters, converter.SelectedToConversion);
        }
Exemplo n.º 3
0
        public void SetConverterValues()
        {
            var converter = new DynamoConverter() {SelectedMetricConversion =ConversionMetricUnit.Area};
            Assert.NotNull(converter);

            Assert.AreEqual(ConversionMetricUnit.Area, converter.SelectedMetricConversion);
            Assert.AreEqual(ConversionUnit.SquareMeter, converter.SelectedFromConversion);
            Assert.AreEqual(ConversionUnit.SquareMeter, converter.SelectedToConversion);
        }
Exemplo n.º 4
0
        public void ConverterDefaultValues()
        {
            var converter = new DynamoConverter();

            Assert.NotNull(converter);

            Assert.AreEqual(ConversionMetricUnit.Length, converter.SelectedMetricConversion);
            Assert.AreEqual(ConversionUnit.Meters, converter.SelectedFromConversion);
            Assert.AreEqual(ConversionUnit.Meters, converter.SelectedToConversion);
        }
Exemplo n.º 5
0
        public void ConverterItemSourceCount()
        {
            var converter = new DynamoConverter()
            {
                SelectedMetricConversion = ConversionMetricUnit.Volume
            };

            Assert.NotNull(converter);

            Assert.AreEqual("8", ((dynamic)converter.SelectedFromConversionSource).Count.ToString());
            Assert.AreEqual("8", ((dynamic)converter.SelectedToConversionSource).Count.ToString());
        }
Exemplo n.º 6
0
        public void SetConverterValues()
        {
            var converter = new DynamoConverter()
            {
                SelectedMetricConversion = ConversionMetricUnit.Area
            };

            Assert.NotNull(converter);

            Assert.AreEqual(ConversionMetricUnit.Area, converter.SelectedMetricConversion);
            Assert.AreEqual(ConversionUnit.SquareMeter, converter.SelectedFromConversion);
            Assert.AreEqual(ConversionUnit.SquareMeter, converter.SelectedToConversion);
        }
Exemplo n.º 7
0
        public void ConvertSetConversionFromValue()
        {
            var converter = new DynamoConverter()
            {
                SelectedMetricConversion = ConversionMetricUnit.Length
            };

            Assert.NotNull(converter);

            Assert.AreEqual(ConversionMetricUnit.Length, converter.SelectedMetricConversion);
            Assert.AreEqual(ConversionUnit.Meters, converter.SelectedFromConversion);
            Assert.AreEqual(ConversionUnit.Meters, converter.SelectedToConversion);

            converter.SelectedFromConversion = ConversionUnit.Feet;
            Assert.AreEqual(ConversionUnit.Feet, converter.SelectedFromConversion);
            Assert.AreEqual(ConversionUnit.Meters, converter.SelectedToConversion);
        }
Exemplo n.º 8
0
        public void ConvertSetConversionToValue()
        {
            var converter = new DynamoConverter()
            {
                SelectedMetricConversion = ConversionMetricUnit.Volume
            };

            Assert.NotNull(converter);

            Assert.AreEqual(ConversionMetricUnit.Volume, converter.SelectedMetricConversion);
            Assert.AreEqual(ConversionUnit.CubicMeters, converter.SelectedFromConversion);
            Assert.AreEqual(ConversionUnit.CubicMeters, converter.SelectedToConversion);

            converter.SelectedToConversion = ConversionUnit.CubicInches;
            Assert.AreEqual(ConversionUnit.CubicMeters, converter.SelectedFromConversion);
            Assert.AreEqual(ConversionUnit.CubicInches, converter.SelectedToConversion);
        }
Exemplo n.º 9
0
        public void ConverterTestToggleState()
        {
            var converter = new DynamoConverter()
            {
                SelectedMetricConversion = ConversionMetricUnit.Length
            };

            Assert.NotNull(converter);

            Assert.AreEqual(ConversionMetricUnit.Length, converter.SelectedMetricConversion);
            Assert.AreEqual(ConversionUnit.Meters, converter.SelectedFromConversion);
            Assert.AreEqual(ConversionUnit.Meters, converter.SelectedToConversion);

            converter.SelectedFromConversion = ConversionUnit.Feet;
            Assert.AreEqual(ConversionUnit.Feet, converter.SelectedFromConversion);
            Assert.AreEqual(ConversionUnit.Meters, converter.SelectedToConversion);

            converter.ToggleDropdownValues();
            Assert.AreEqual(ConversionUnit.Meters, converter.SelectedFromConversion);
            Assert.AreEqual(ConversionUnit.Feet, converter.SelectedToConversion);
        }
Exemplo n.º 10
0
        public void ConvertSetConversionToValue()
        {
            var converter = new DynamoConverter() { SelectedMetricConversion = ConversionMetricUnit.Volume };
            Assert.NotNull(converter);
          
            Assert.AreEqual(ConversionMetricUnit.Volume, converter.SelectedMetricConversion);
            Assert.AreEqual(ConversionUnit.CubicMeters, converter.SelectedFromConversion);
            Assert.AreEqual(ConversionUnit.CubicMeters, converter.SelectedToConversion);

            converter.SelectedToConversion = ConversionUnit.CubicInches;
            Assert.AreEqual(ConversionUnit.CubicMeters, converter.SelectedFromConversion);
            Assert.AreEqual(ConversionUnit.CubicInches, converter.SelectedToConversion);
        }
Exemplo n.º 11
0
        public void ConvertSetConversionFromValue()
        {
            var converter = new DynamoConverter() { SelectedMetricConversion = ConversionMetricUnit.Length }; 
            Assert.NotNull(converter);

            Assert.AreEqual(ConversionMetricUnit.Length, converter.SelectedMetricConversion);
            Assert.AreEqual(ConversionUnit.Meters, converter.SelectedFromConversion);
            Assert.AreEqual(ConversionUnit.Meters, converter.SelectedToConversion);

            converter.SelectedFromConversion = ConversionUnit.Feet;
            Assert.AreEqual(ConversionUnit.Feet, converter.SelectedFromConversion);
            Assert.AreEqual(ConversionUnit.Meters, converter.SelectedToConversion);
        }
Exemplo n.º 12
0
 public void CanConstructConverterNode()
 {
     var converter = new DynamoConverter();
     Assert.NotNull(converter);
 }
Exemplo n.º 13
0
        public void ConverterTestToggleState()
        {
            var converter = new DynamoConverter() { SelectedMetricConversion = ConversionMetricUnit.Length };
            Assert.NotNull(converter);

            Assert.AreEqual(ConversionMetricUnit.Length, converter.SelectedMetricConversion);
            Assert.AreEqual(ConversionUnit.Meters, converter.SelectedFromConversion);
            Assert.AreEqual(ConversionUnit.Meters, converter.SelectedToConversion);

            converter.SelectedFromConversion = ConversionUnit.Feet;
            Assert.AreEqual(ConversionUnit.Feet, converter.SelectedFromConversion);
            Assert.AreEqual(ConversionUnit.Meters, converter.SelectedToConversion);

            converter.ToggleDropdownValues();
            Assert.AreEqual(ConversionUnit.Meters, converter.SelectedFromConversion);
            Assert.AreEqual(ConversionUnit.Feet, converter.SelectedToConversion);
        }
Exemplo n.º 14
0
        public void CanConstructConverterNode()
        {
            var converter = new DynamoConverter();

            Assert.NotNull(converter);
        }