public void WholeObjectTest() { var model = new { foo = "bar" }; var dc = new YateDataContext(model); Assert.AreSame(model, dc.GetValue(".")); Assert.AreEqual(model, dc.GetValue(".")); }
public void CanPushValuesAndGetBothObjectsValues() { var dc = new YateDataContext(new { foo = "bar" }); dc.PushValue(new { hello = "world" }); Assert.AreEqual("bar", dc.GetValue("foo")); Assert.AreEqual("world", dc.GetValue("hello")); }
public void PopingRemovesModels() { var dc = new YateDataContext(new { foo = "bar" }); dc.PushValue(new { hello = "world" }); Assert.AreEqual("bar", dc.GetValue("foo")); Assert.AreEqual("world", dc.GetValue("hello")); dc.PopValue(); Assert.AreEqual("bar", dc.GetValue("foo")); Assert.AreEqual(null, dc.GetValue("hello")); }
public void DoesNotExistGivesNull() { var dc = new YateDataContext(new { foo = "bar" }); Assert.AreEqual(null, dc.GetValue("yeahBUddy")); }
public void DoesItWork() { var dc = new YateDataContext(new { foo = "bar" }); Assert.AreEqual("bar", dc.GetValue("foo")); }