public void GivenIHaveSuppliedAJSONFragment() { var finder = new JsonPropertyFinder(new CharacterFinder(_reader), new WordBuilder(_reader), new JsonPropertyValidator(_reader)); _results = finder.Find("address").ToList(); }
public void GivenIHaveFoundAJSONProperty() { var stream = new MemoryStream(Encoding.UTF8.GetBytes(Resources.LargeJSON)); _reader = new BinaryReader(stream); var finder = new JsonPropertyFinder(new CharacterFinder(_reader), new WordBuilder(_reader), new JsonPropertyValidator(_reader)); var first = finder.Find("response").First(); }
public void ThenTheJsonPropertyFinderWillReturnThePropertySPositionInTheStream() { var positions = _finder.Find(_jsonProperty); var firstValidPosition = positions.First(p => p > -1); Assert.AreEqual(37L, firstValidPosition); _reader.Dispose(); }
public void GivenIHaveFoundAJSONProperty() { var stream = new MemoryStream(Encoding.UTF8.GetBytes(Resources.LargeJSON)); _reader = new BinaryReader(stream); var finder = new JsonPropertyFinder(new CharacterFinder(_reader), new WordBuilder(_reader), new JsonPropertyValidator(_reader)); var first = finder.Find("response").First(); }
public void GivenIHaveSuppliedAJSONFragment() { var finder = new JsonPropertyFinder(new CharacterFinder(_reader), new WordBuilder(_reader), new JsonPropertyValidator(_reader)); _results = finder.Find("address").ToList(); }