Exemple #1
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);
        }
        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);
        }