public void RunTest(string testCaseName) { var testCase = GetTestCase($"defaultr/{testCaseName}"); var defaultr = new Defaultr(testCase.Spec); var actual = defaultr.Transform(testCase.Input); actual.Should().BeEquivalentTo(testCase.Expected); }
public void DeepCopyTest() { var testCase = GetTestCase("defaultr/__deepCopyTest"); Defaultr defaultr = new Defaultr(testCase.Spec); { var fiddle = defaultr.Transform(testCase.Input); var array = (JArray)fiddle["array"]; array.Add("a"); var subMap = (JObject)fiddle["map"]; subMap["c"] = "c"; } { var testCase2 = GetTestCase("defaultr/__deepCopyTest"); var actual = defaultr.Transform(testCase2.Input); actual.Should().BeEquivalentTo(testCase2.Expected); } }