/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* See LICENSE.txt included in this distribution for the specific
* language governing permissions and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at LICENSE.txt.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*/
/**
* Unit tests for the {@code HistoryContext} class.
*/
public class HistoryContextTest {
repositories = new TestRepository();
}
repositories = null;
}
@Test
public void testIsEmpty() {
// The queries that don't contain a "hist" term are considered empty.
}
@Test
// Construct a query equivalent to hist:dummy
"Created a small <b>dummy</b> program"));
// Construct a query equivalent to hist:"dummy program"
"Created a small <b>dummy program</b>"));
// Search for a term that doesn't exist
// Search for term with multiple hits - hist:small OR hist:target
"Add lint make <b>target</b> and fix lint warnings"));
"Created a <b>small</b> dummy program"));
}
@Test
// Construct a query equivalent to hist:dummy
"Created a small <b>dummy</b> program"));
// Construct a query equivalent to hist:"dummy program"
sw = new StringWriter();
"Created a small <b>dummy program</b>"));
// Search for a term that doesn't exist
sw = new StringWriter();
// Search for term with multiple hits - hist:small OR hist:target
sw = new StringWriter();
"Add lint make <b>target</b> and fix lint warnings"));
"Created a <b>small</b> dummy program"));
}
}