public void simple_query_for_all_field_of_episode() { var query = TestHelper.CreateQuery <Episode>(); var result = QueryParserFactory .Create(query) .Parse(); Assert.Equal("query GetEpisode{Author,Id,Name}", result); }
public void simple_query_for_all_field_of_basemodel() { var query = TestHelper.CreateQuery <BaseModel>(); var result = QueryParserFactory .Create(query) .Parse(); Assert.Equal("query GetBaseModel{Id}", result); }
public void queryparser_query_name_condition() { var query = TestHelper.CreateQuery <BaseModel>(); var result = QueryParserFactory .Create(query) .Parse(); Assert.Contains("GetBaseModel", result); }
public void queryparser_query_return() { var query = TestHelper.CreateQuery <BaseModel>(); var result = QueryParserFactory .Create(query) .Parse(); Assert.Contains("query", result); }
public void simple_query_with_select_of_person() { var query = TestHelper.CreateQuery <Episode>() .Select(x => new { x.Id, x.Author.Name }); var result = QueryParserFactory .Create(query) .Parse(); Assert.Equal("query GetEpisode{Author{Name},Id}", result); }
public void queryparser_argument_exception() { Assert.Throws <ArgumentNullException>(() => QueryParserFactory.Create(null)); }
public void queryparser_string_return() { QueryParserFactory.Create(TestHelper.CreateQuery <BaseModel>()); }