本文整理匯總了Java中org.crsh.vfs.Resource類的典型用法代碼示例。如果您正苦於以下問題:Java Resource類的具體用法?Java Resource怎麽用?Java Resource使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
Resource類屬於org.crsh.vfs包,在下文中一共展示了Resource類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: testCommandResolution
import org.crsh.vfs.Resource; //導入依賴的package包/類
@Test
public void testCommandResolution() {
load();
PluginLifeCycle lifeCycle = this.context.getBean(PluginLifeCycle.class);
int count = 0;
Iterator<Resource> resources = lifeCycle.getContext()
.loadResources("login", ResourceKind.LIFECYCLE).iterator();
while (resources.hasNext()) {
count++;
resources.next();
}
assertThat(count).isEqualTo(1);
count = 0;
resources = lifeCycle.getContext()
.loadResources("sleep.groovy", ResourceKind.COMMAND).iterator();
while (resources.hasNext()) {
count++;
resources.next();
}
assertThat(count).isEqualTo(1);
}
開發者ID:vikrammane23,項目名稱:https-github.com-g0t4-jenkins2-course-spring-boot,代碼行數:22,代碼來源:CrshAutoConfigurationTests.java
示例2: testCommandResolution
import org.crsh.vfs.Resource; //導入依賴的package包/類
@Test
public void testCommandResolution() {
this.context = new AnnotationConfigWebApplicationContext();
this.context.register(CrshAutoConfiguration.class);
this.context.refresh();
PluginLifeCycle lifeCycle = this.context.getBean(PluginLifeCycle.class);
int count = 0;
Iterator<Resource> resources = lifeCycle.getContext()
.loadResources("login", ResourceKind.LIFECYCLE).iterator();
while (resources.hasNext()) {
count++;
resources.next();
}
assertEquals(1, count);
count = 0;
resources = lifeCycle.getContext()
.loadResources("sleep.groovy", ResourceKind.COMMAND).iterator();
while (resources.hasNext()) {
count++;
resources.next();
}
assertEquals(1, count);
}
示例3: testDisabledCommandResolution
import org.crsh.vfs.Resource; //導入依賴的package包/類
@Test
public void testDisabledCommandResolution() {
this.context = new AnnotationConfigWebApplicationContext();
this.context.register(CrshAutoConfiguration.class);
this.context.refresh();
PluginLifeCycle lifeCycle = this.context.getBean(PluginLifeCycle.class);
int count = 0;
Iterator<Resource> resources = lifeCycle.getContext()
.loadResources("jdbc.groovy", ResourceKind.COMMAND).iterator();
while (resources.hasNext()) {
count++;
resources.next();
}
assertEquals(0, count);
}
示例4: testDisabledCommandResolution
import org.crsh.vfs.Resource; //導入依賴的package包/類
@Test
public void testDisabledCommandResolution() {
load();
PluginLifeCycle lifeCycle = this.context.getBean(PluginLifeCycle.class);
int count = 0;
Iterator<Resource> resources = lifeCycle.getContext()
.loadResources("jdbc.groovy", ResourceKind.COMMAND).iterator();
while (resources.hasNext()) {
count++;
resources.next();
}
assertThat(count).isEqualTo(0);
}
開發者ID:vikrammane23,項目名稱:https-github.com-g0t4-jenkins2-course-spring-boot,代碼行數:14,代碼來源:CrshAutoConfigurationTests.java