public void ParseQueryForPaging_InjectsPostMoveTagWithWhereClause() { var query = WorkItemTrackingHelpers.ParseQueryForPaging("SELECT * FROM WorkItems WHERE System.Id = 1 order BY System.Id", "Migrated"); Assert.AreEqual("SELECT * FROM WorkItems WHERE (System.Id = 1) AND System.Tags NOT CONTAINS 'Migrated'", query); }
public void ParseQueryForPaging_StripsOrderByClause() { var query = WorkItemTrackingHelpers.ParseQueryForPaging("SELECT * FROM WorkItems order BY System.Id", null); Assert.AreEqual("SELECT * FROM WorkItems", query); }
public void ParseQueryForPaging_NoOrderByClause() { var parsedQuery = WorkItemTrackingHelpers.ParseQueryForPaging("SELECT * FROM WorkItems", null); Assert.AreEqual("SELECT * FROM WorkItems", parsedQuery); }