public void GetValueFromJsonIfPropertIsSet() { Moksy.Storage.SimulationManager manager = new Storage.SimulationManager(); var result = manager.GetPropertyValueFromJson(@"{ ""TheProperty"" : ""TheValue"" }", "TheProperty"); Assert.AreEqual("TheValue", result); }
public void GetValueFromJsonIsNullIfNotJsonButPropertyNull() { Moksy.Storage.SimulationManager manager = new Storage.SimulationManager(); var result = manager.GetPropertyValueFromJson("sdfsdf", null); Assert.IsNull(result); }
public void GetValueFromJsonIfPropertIsNull() { Moksy.Storage.SimulationManager manager = new Storage.SimulationManager(); var result = manager.GetPropertyValueFromJson(@"{ ""TheProperty"" : null }", "TheProperty"); Assert.IsNull(result); }