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:
Kirill Likhodedov
2017-02-09 15:17:29 +00:00
parent 1bba04c595
commit 3e2ad28baf
2 changed files with 1 additions and 14 deletions
@@ -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;