public void GetValue_WhiteSpacePropertyName()
 {
     try
     {
         IUpdatable context = new DummyContext();
         context.GetValue(new object(), "\t");
         Assert.Fail("An ArgumentException was expected.");
     }
     catch (System.ArgumentException) { }
 }
 public void GetValue_NullResource()
 {
     try
     {
         IUpdatable context = new DummyContext();
         context.GetValue(null, "Name");
         Assert.Fail("An ArgumentNullException was expected.");
     }
     catch (System.ArgumentNullException) { }
 }
        public void GetValue_UnknownPropertyName()
        {
            try
            {
                IUpdatable context = new DummyContext();
                TestModel model = new TestModel() { Name = "TestName" };

                context.GetValue(model, "NotNameProperty");
                Assert.Fail("An UnknownPropertyException was expected.");
            }
            catch (UnknownPropertyException) { }
        }
        public void GetValue_CorrectValueReturned()
        {
            IUpdatable context = new DummyContext();
            TestModel model = new TestModel() { Name = "TestString" };

            Assert.AreEqual("TestString", context.GetValue(model, "Name"),
                    "The value of the Name property should have been returned.");
        }