use of com.google.cloud.tools.intellij.appengine.facet.standard.AppEngineStandardLibraryPanel in project google-cloud-intellij by GoogleCloudPlatform.
the class AppEngineStandardSupportProviderTest method testAppEngine_defaultManagedLibrariesSelected.
public void testAppEngine_defaultManagedLibrariesSelected() {
AppEngineStandardLibraryPanel libraryPanel = new AppEngineStandardLibraryPanel(true);
LibraryEx library = mock(LibraryEx.class);
when(library.getTable()).thenReturn(ProjectLibraryTable.getInstance(myModule.getProject()));
when(library.getExcludedRoots()).thenReturn(new VirtualFile[0]);
when(library.getName()).thenReturn("javax.servlet:servlet-api:2.5");
setupAppEngine(libraryPanel, library);
addSupport();
assertNull(FacetManager.getInstance(myModule).getFacetByType(WebFacet.ID));
final String moduleName = myModule.getName();
ArtifactsTestUtil.assertLayout(myProject, moduleName, "<root>\n" + " WEB-INF/\n" + " classes/\n" + " module:" + moduleName + "\n" + " lib/\n" + " lib:javax.servlet:servlet-api:2.5(project)\n");
}
use of com.google.cloud.tools.intellij.appengine.facet.standard.AppEngineStandardLibraryPanel in project google-cloud-intellij by GoogleCloudPlatform.
the class AppEngineStandardSupportProviderTest method testAppEngine_noManagedLibrariesSelected.
public void testAppEngine_noManagedLibrariesSelected() {
setupAppEngine(new AppEngineStandardLibraryPanel(false), null);
addSupport();
assertNull(FacetManager.getInstance(myModule).getFacetByType(WebFacet.ID));
final String moduleName = myModule.getName();
ArtifactsTestUtil.assertLayout(myProject, moduleName, "<root>\n" + " WEB-INF/\n" + " classes/\n" + " module:" + moduleName + "\n");
}
use of com.google.cloud.tools.intellij.appengine.facet.standard.AppEngineStandardLibraryPanel in project google-cloud-intellij by GoogleCloudPlatform.
the class AppEngineStandardSupportProviderTest method testAppEngineWithWeb_noManagedLibrariesSelected.
public void testAppEngineWithWeb_noManagedLibrariesSelected() {
setupAppEngine(new AppEngineStandardLibraryPanel(false), null);
selectFramework(WebFacet.ID);
selectVersion(WebFrameworkType.getInstance(), new WebFrameworkVersion(WebAppVersion.WebAppVersion_2_5));
addSupport();
getFacet(AppEngineStandardFacetType.ID);
assertFileExist("web/WEB-INF/web.xml");
assertFileExist("web/WEB-INF/appengine-web.xml");
final String moduleName = myModule.getName();
Artifact artifact = ArtifactsTestUtil.findArtifact(myProject, moduleName + ":war exploded");
ArtifactsTestUtil.assertLayout(artifact.getRootElement(), "<root>\n" + " javaee-resources:Web(" + moduleName + ")\n" + " WEB-INF/\n" + " classes/\n" + " module:" + moduleName + "\n");
assertRunConfigurationCreated(artifact);
}
Aggregations