本文整理汇总了Java中org.uberfire.backend.vfs.impl.ObservablePathImpl类的典型用法代码示例。如果您正苦于以下问题:Java ObservablePathImpl类的具体用法?Java ObservablePathImpl怎么用?Java ObservablePathImpl使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ObservablePathImpl类属于org.uberfire.backend.vfs.impl包,在下文中一共展示了ObservablePathImpl类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testInitResetsConcurrentSessionInfo
import org.uberfire.backend.vfs.impl.ObservablePathImpl; //导入依赖的package包/类
@Test
public void testInitResetsConcurrentSessionInfo() throws Exception {
kieEditor.isReadOnly = false;
when(kieEditor.versionRecordManager.isCurrentLatest()).thenReturn(true);
kieEditor.concurrentUpdateSessionInfo = new ObservablePath.OnConcurrentUpdateEvent() {
@Override
public Path getPath() {
return null;
}
@Override
public String getId() {
return null;
}
@Override
public User getIdentity() {
return null;
}
};
kieEditor.init(new ObservablePathImpl(),
kieEditor.place,
kieEditor.type,
kieEditor.menuItems.toArray(new MenuItems[0]));
kieEditor.onSave();
verify(kieEditor,
never()).showConcurrentUpdatePopup();
}
示例2: onRestoreWithNullRestoreEventShouldNotInitEditor
import org.uberfire.backend.vfs.impl.ObservablePathImpl; //导入依赖的package包/类
@Test
public void onRestoreWithNullRestoreEventShouldNotInitEditor() throws Exception {
kieEditor.onRestore(null);
when(kieEditor.versionRecordManager.getPathToLatest()).thenReturn(new ObservablePathImpl());
verify(kieEditor).onRestore(any());
verify(kieEditor.versionRecordManager,
never()).getPathToLatest();
}
示例3: setupBeans
import org.uberfire.backend.vfs.impl.ObservablePathImpl; //导入依赖的package包/类
@BeforeClass
public static void setupBeans() {
((SyncBeanManagerImpl) IOC.getBeanManager()).reset();
IOC.getBeanManager().registerBean(new MockIOCBeanDef<ObservablePath, ObservablePathImpl>(new ObservablePathImpl(),
ObservablePath.class,
Dependent.class,
new HashSet<Annotation>(Arrays.asList(QualifierUtil.DEFAULT_QUALIFIERS)),
null,
true));
}
示例4: setup
import org.uberfire.backend.vfs.impl.ObservablePathImpl; //导入依赖的package包/类
@Before
public void setup() {
when(project.getIdentifier()).thenReturn("id");
final Caller<POMService> pomServiceCaller = new CallerMock<POMService>(pomService);
final Caller<RepositoryStructureService> repositoryStructureServiceCaller = new CallerMock<RepositoryStructureService>(repositoryStructureService);
when(view.getModulesView()).thenReturn(modulesView);
presenter = new RepositoryStructurePresenter(view,
pomServiceCaller,
repositoryStructureServiceCaller,
mock(RepositoryStructureTitle.class),
contextChangeEvent,
conflictingRepositoriesPopup,
mock(RepositoryStructureMenu.class),
placeManager,
workbenchContext,
wizard,
mock(RepositoryManagedStatusUpdater.class)) {
@Override
ObservablePath createObservablePath(final Path path) {
return new ObservablePathImpl().wrap(path);
}
@Override
void destroyObservablePath(final ObservablePath path) {
//Do nothing
}
};
}
示例5: testFireChangeTitleEvent_LockInfoUpdateForActiveDecisionTable
import org.uberfire.backend.vfs.impl.ObservablePathImpl; //导入依赖的package包/类
@Test
public void testFireChangeTitleEvent_LockInfoUpdateForActiveDecisionTable() {
lockManager.init( mock( LockTarget.class ),
modellerPresenter );
final GuidedDecisionTableView.Presenter dtPresenter = mock( GuidedDecisionTableView.Presenter.class );
when( dtPresenter.getCurrentPath() ).thenReturn( new ObservablePathImpl().wrap( dtPath ) );
when( modellerPresenter.getActiveDecisionTable() ).thenReturn( dtPresenter );
lockManager.fireChangeTitleEvent();
verify( changeTitleEvent,
times( 1 ) ).fire( any( ChangeTitleWidgetEvent.class ) );
}
示例6: constructProjectScreenPresenter
import org.uberfire.backend.vfs.impl.ObservablePathImpl; //导入依赖的package包/类
protected void constructProjectScreenPresenter(final KieModule module) {
doAnswer(invocationOnMock -> {
((ParameterizedCommand<GAVPreferences>) invocationOnMock.getArguments()[1]).execute(gavPreferences);
return null;
}).when(gavPreferences).load(any(PreferenceScopeResolutionStrategyInfo.class),
any(ParameterizedCommand.class),
any(ParameterizedCommand.class));
presenter = new ProjectScreenPresenter(view,
context,
new CallerMock<>(projectScreenService),
user,
notificationEvent,
mock(EventSourceMock.class),
mock(EventSourceMock.class),
mock(ProjectNameValidator.class),
mock(PlaceManager.class),
mock(BusyIndicatorView.class),
new CallerMock<>(mock(ValidationService.class)),
lockManagerInstanceProvider,
mock(EventSourceMock.class),
conflictingRepositoriesPopup,
copyPopUpPresenter,
savePopUpPresenter,
gavPreferences,
projectScopedResolutionStrategySupplier,
resourceTypeDefinitions,
buildExecutor) {
@Override
protected Pair<Collection<BuildOptionExtension>, Collection<BuildOptionExtension>> getBuildExtensions() {
//Do nothing. This method makes direct use of IOC and fails to be mocked
return new Pair<>(Collections.EMPTY_LIST,
Collections.EMPTY_LIST);
}
@Override
protected void destroyExtensions(final Collection<BuildOptionExtension> extensions) {
//Do nothing. This method makes direct use of IOC and fails to be mocked
}
@Override
protected void setupPathToPomXML() {
//Stub the real implementation that makes direct use of IOC and fails to be mocked
observablePathToPomXML = new ObservablePathImpl().wrap(module.getPomXMLPath());
pathToPomXML = observablePathToPomXML;
}
};
}