Exemplo n.º 1
0
        public void GetValue()
        {
            var lookup = new NamedLookup("One", "Two", "Three", "Five", "six");

            using (lookup.SetValues(1, 2.0, 3, 5, "SIXSIXSIX"))
            {
                Assert.AreEqual(1, lookup.GetValue <int>("One"));
                Assert.AreEqual(2.0, lookup.GetValue <double>("Two"));
            }
            ExceptionUtility.Expect <NullReferenceException>(() => lookup.GetValue <int>("One"));
        }
 public T Get() => _lookup.GetValue <T>(_index);