Ejemplo n.º 1
0
		public void Query_PropertyNoMatchFirstOrDefault_ReturnsNull()
		{
			var input = @"
[
	{
		""key"": ""value""
	},
	{
		""key"": ""other-value""
	}
]";

			var expected = (object)null;

			var source = new JsonReader().Query(input, new { key=String.Empty });

			var query = source.Where(obj => obj.key == "not-a-key");

			var actual = query.FirstOrDefault();

			Assert.Equal(expected, actual, false);
		}