Esempio n. 1
0
 @Test
 public void verify() throws Exception {
   QueryExecutionType executionType = expected.type();
   assertEquals(expected.isProfiled, executionType.isProfiled());
   assertEquals(
       expected.requestedExecutionPlanDescription,
       executionType.requestedExecutionPlanDescription());
   assertEquals(expected.isExplained, executionType.isExplained());
   assertEquals(expected.canContainResults, executionType.canContainResults());
   assertEquals(expected.canUpdateData, executionType.canUpdateData());
   assertEquals(expected.canUpdateSchema, executionType.canUpdateSchema());
 }
Esempio n. 2
0
 @Test
 public void noneOtherLikeIt() throws Exception {
   for (QueryExecutionType.QueryType queryType : QueryExecutionType.QueryType.values()) {
     for (QueryExecutionType type :
         new QueryExecutionType[] {query(queryType), profiled(queryType), explained(queryType)}) {
       // the very same object will have the same flags, as will all the explained ones...
       if (type != expected.type() && !(expected.type().isExplained() && type.isExplained())) {
         assertFalse(
             expected.type().toString(),
             expected.isProfiled == type.isProfiled()
                 && expected.requestedExecutionPlanDescription
                     == type.requestedExecutionPlanDescription()
                 && expected.isExplained == type.isExplained()
                 && expected.canContainResults == type.canContainResults()
                 && expected.canUpdateData == type.canUpdateData()
                 && expected.canUpdateSchema == type.canUpdateSchema());
       }
     }
   }
 }