use of com.redhat.devtools.intellij.tektoncd.tkn.TknCliFactory in project intellij-tekton by redhat-developer.
the class TektonTreeStructureTest method OnUpdate_NamespaceHasBeenChanged_Refresh.
@Test
public void OnUpdate_NamespaceHasBeenChanged_Refresh() {
Config newConfig = createConfig("cluster", "changed", "token", "user");
try (MockedStatic<TknCliFactory> tknCliFactoryMockedStatic = mockStatic(TknCliFactory.class)) {
tknCliFactoryMockedStatic.when(() -> TknCliFactory.getInstance()).thenReturn(tknCliFactory);
structure.onUpdate(configWatcher, newConfig);
verify(structure, times(1)).refresh();
}
}
use of com.redhat.devtools.intellij.tektoncd.tkn.TknCliFactory in project intellij-tekton by redhat-developer.
the class TektonTreeStructureTest method OnUpdate_TokenHasBeenChanged_Refresh.
@Test
public void OnUpdate_TokenHasBeenChanged_Refresh() {
Config newConfig = createConfig("cluster", "namespace", "changed", "user");
try (MockedStatic<TknCliFactory> tknCliFactoryMockedStatic = mockStatic(TknCliFactory.class)) {
tknCliFactoryMockedStatic.when(() -> TknCliFactory.getInstance()).thenReturn(tknCliFactory);
structure.onUpdate(configWatcher, newConfig);
verify(structure, times(1)).refresh();
}
}
use of com.redhat.devtools.intellij.tektoncd.tkn.TknCliFactory in project intellij-tekton by redhat-developer.
the class TektonTreeStructureTest method OnUpdate_ClusterHasBeenChanged_Refresh.
@Test
public void OnUpdate_ClusterHasBeenChanged_Refresh() {
Config newConfig = createConfig("changed", "namespace", "token", "user");
try (MockedStatic<TknCliFactory> tknCliFactoryMockedStatic = mockStatic(TknCliFactory.class)) {
tknCliFactoryMockedStatic.when(() -> TknCliFactory.getInstance()).thenReturn(tknCliFactory);
structure.onUpdate(configWatcher, newConfig);
verify(structure, times(1)).refresh();
}
}
use of com.redhat.devtools.intellij.tektoncd.tkn.TknCliFactory in project intellij-tekton by redhat-developer.
the class TektonTreeStructureTest method OnUpdate_UserHasBeenChanged_Refresh.
@Test
public void OnUpdate_UserHasBeenChanged_Refresh() {
Config newConfig = createConfig("cluster", "namespace", "token", "changed");
try (MockedStatic<TknCliFactory> tknCliFactoryMockedStatic = mockStatic(TknCliFactory.class)) {
tknCliFactoryMockedStatic.when(() -> TknCliFactory.getInstance()).thenReturn(tknCliFactory);
structure.onUpdate(configWatcher, newConfig);
verify(structure, times(1)).refresh();
}
}
Aggregations