Exemplo n.º 1
0
        public void ToStringShouldWork(double value, string expected)
        {
            var original = new LuxIlluminance(value);
            var actual = original.ToString();

            Assert.That(actual, Is.EqualTo(expected));
        }
Exemplo n.º 2
0
        public static IIlluminance Parse(double value, string type)
        {
            IIlluminance result;

            switch (type.ToLower())
            {
                case "l":
                case "lux":
                    result = new LuxIlluminance(value);
                    break;

                default:
                    throw new Exception("Could not determine type " + type);
            }

            return result;
        }
Exemplo n.º 3
0
        public static IIlluminance Parse(double value, string type)
        {
            IIlluminance result;

            switch (type.ToLower())
            {
            case "l":
            case "lux":
                result = new LuxIlluminance(value);
                break;

            default:
                throw new Exception("Could not determine type " + type);
            }

            return(result);
        }