public void CanCountAtRoot() { var text = "[ {\"a\": 1}, {}, {}, \"dsd\", 1]"; Assert.Equal(5, JsonCounter.Count(text, "")); }
public void CountsCorrectlyDeep() { var text = File.ReadAllText("a.json"); Assert.Equal(4, JsonCounter.Count(text, "siba/vala")); }
public void ReturnsNullIfNotFound() { var text = File.ReadAllText("a.json"); Assert.Equal(null, JsonCounter.Count(text, "recommendations/bibi")); }
public void CountsCorrectlyShallow() { var text = File.ReadAllText("a.json"); Assert.Equal(60, JsonCounter.Count(text, "recommendations")); }