public void ApplyEpochNumber(string json, string orig_version, string new_version) { JObject metadata = JObject.Parse(json); Assert.AreEqual(orig_version, (string)metadata["version"], "JSON parsed as expected"); metadata = new EpochTransformer().Transform(new Metadata(metadata)).Json(); Assert.AreEqual(new_version, (string)metadata["version"], "Output string as expected"); }
public void FixVersionStringsUnharmed() { JObject metadata = JObject.Parse(TestData.DogeCoinFlag_101()); Assert.AreEqual("1.01", (string)metadata["version"], "Original version as expected"); metadata = new EpochTransformer().Transform(new Metadata(metadata)).Json(); Assert.AreEqual("1.01", (string)metadata["version"], "Version unharmed without x_netkan_force_v"); }