mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
git tests: don't override useful production method
E.g. createNotification() handles the "empty content" situation. Override only the exact method to notify.
This commit is contained in:
@@ -67,8 +67,7 @@ public class VcsNotifier {
|
||||
@NotNull NotificationType type,
|
||||
@Nullable NotificationListener listener) {
|
||||
Notification notification = createNotification(notificationGroup, title, message, type, listener);
|
||||
notification.notify(myProject);
|
||||
return notification;
|
||||
return notify(notification);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
@@ -16,12 +16,8 @@
|
||||
package com.intellij.openapi.vcs;
|
||||
|
||||
import com.intellij.notification.Notification;
|
||||
import com.intellij.notification.NotificationGroup;
|
||||
import com.intellij.notification.NotificationListener;
|
||||
import com.intellij.notification.NotificationType;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class TestVcsNotifier extends VcsNotifier {
|
||||
|
||||
@@ -37,14 +33,6 @@ public class TestVcsNotifier extends VcsNotifier {
|
||||
return myLastNotification;
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public Notification notify(@NotNull NotificationGroup notificationGroup, @NotNull String title, @NotNull String message,
|
||||
@NotNull NotificationType type, @Nullable NotificationListener listener) {
|
||||
myLastNotification = new Notification(TEST_NOTIFICATION_GROUP, title, message, type, listener);
|
||||
return myLastNotification;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public Notification notify(@NotNull Notification notification) {
|
||||
myLastNotification = notification;
|
||||
|
||||
Reference in New Issue
Block a user