public void TestLoadingZeroValue() { var corpus = new CdmCorpusDefinition(); var argumentData = new JObject { { "value", 0 } }; var argument = ArgumentPersistence.FromData(corpus.Ctx, argumentData); Assert.AreEqual(0, argument.Value); var argumentToData = ArgumentPersistence.ToData(argument, null, null); Assert.AreEqual(0, argumentToData); }
public void TestLoadingBlankName() { var corpus = new CdmCorpusDefinition(); var argumentData = new JObject() { ["name"] = " ", ["value"] = 0 }; var argument = ArgumentPersistence.FromData(corpus.Ctx, argumentData); Assert.AreEqual(0, argument.Value); var argumentToData = ArgumentPersistence.ToData(argument, null, null); Assert.AreEqual(0, argumentToData); }