use of org.eclipse.m2e.core.ui.internal.editing.AddDependencyOperation in project m2e-core-tests by tesla.
the class AddDependencyOperationTest method testWithDependencies.
@Test
public void testWithDependencies() throws Exception {
//
document.setText(//
StructuredModelManager.getModelManager(), //
"<project><dependencies>" + //
"<dependency><groupId>AAA</groupId><artifactId>BBB</artifactId><version>1.0</version></dependency>" + //
"<dependency><groupId>AAAB</groupId><artifactId>BBB</artifactId><version>1.0</version></dependency>" + "</dependencies></project>");
PomEdits.performOnDOMDocument(new OperationTuple(tempModel, new AddDependencyOperation(d)));
assertEquals("Expected dependency: " + d.toString() + "\n" + document.getText(), 1, dependencyCount(tempModel, d));
assertEquals("Dependency Count: \n" + document.getText(), 3, getDependencyCount(tempModel));
}
Aggregations