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")); }