public void UnescapingJson(string input, string expected) { JSONOperations json = new JSONOperations(); var result = json.UnEscape(input); Assert.AreEqual(expected, result); }
public async void Test1() { AggregateCalculationsClass gdp = new AggregateCalculationsClass(); JObject actual = await gdp.AggregateCalculations(); string ExpectedOutput = await FileOperations.ReadfileAsync("../../../expected-output.json"); JObject expected = JSONOperations.DeSerializeString(ExpectedOutput); Assert.Equal(expected, actual); }
public async Task Test1Async() { AggregateGDPPopulation AGP = new AggregateGDPPopulation(); await AGP.performAggregateOperation(); Task <string> actualstring = IOOperations.ReadFileToEndAsync("../../../../AggregateGDPPopulation/output/output.json"); Task <string> expectedstring = IOOperations.ReadFileToEndAsync("../../../expected-output.json"); string actual = await actualstring; string expected = await expectedstring; JObject ExpectedJO = JSONOperations.JSONDeserialize(actual); JObject ActualJO = JSONOperations.JSONDeserialize(expected); Assert.Equal(ExpectedJO, ActualJO); }
public async void Test1() { //await Program.Main(); //var actual = await Program.ReadAsync(@"../../../../AggregateGDPPopulation/output/output.json"); //var expected = await Program.ReadAsync(@"../../../expected-output.json"); //JObject actualJson = JObject.Parse(actual); //JObject expectedJson = JObject.Parse(expected); //Assert.Equal(actualJson, expectedJson); AggregateCalculationsClass gdp = new AggregateCalculationsClass(); JObject actual = await gdp.AggregateCalculations(); string ExpectedOutput = await FileOperations.ReadfileAsync("../../../expected-output.json"); JObject expected = JSONOperations.DeSerializeString(ExpectedOutput); Assert.Equal(expected, actual); }