Skip to content

Commit

Permalink
Fix: fix suggestion for the pull request (JabRef#3197)
Browse files Browse the repository at this point in the history
  • Loading branch information
lachiri-ilias committed Mar 4, 2024
1 parent bb912ba commit b5a4f2a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/main/java/org/jabref/gui/push/PushToTeXworks.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public String getDisplayName() {
*/
@Override
public JabRefIcon getApplicationIcon() {
return IconTheme.JabRefIcons.DEFAULT_GROUP_ICON; // Temporary Icon that needs to be changed
return IconTheme.JabRefIcons.DEFAULT_GROUP_ICON;
}

/**
Expand Down
10 changes: 4 additions & 6 deletions src/test/java/org/jabref/gui/push/PushToTeXworksTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

// @Disabled("Needs running TeXworks in the background. Start TeXworks with &")
class PushToTeXworksTest {

private PushToTeXworks pushToTeXworks;
Expand All @@ -37,7 +36,7 @@ public void setup() {
ExternalApplicationsPreferences externalApplicationsPreferences = mock(ExternalApplicationsPreferences.class);

// Mock the return value for getCommandPaths()
String teXworksClientPath = "/usr/bin/texworks"; // For linux OS tobe changed in Windows and Mac
String teXworksClientPath = "/usr/bin/texworks";
String displayName = "TeXworks";

Map<String, String> commandPaths = Map.of(displayName, teXworksClientPath);
Expand Down Expand Up @@ -73,7 +72,6 @@ public void setup() {
*/
@Test
void displayName() {
// Test whether the display name is correct
assertEquals("TeXworks", pushToTeXworks.getDisplayName());
}

Expand All @@ -87,9 +85,9 @@ void displayName() {
@Test
void getCommandLine() {
String keyString = "TestKey";
String[] expectedCommand = new String[] {"/usr/bin/texworks", "--insert-text", "TestKey"};
String[] expectedCommand = new String[] {"/usr/bin/texworks", "--insert-text", keyString};

pushToTeXworks.setCommandPath("/usr/bin/texworks"); // TO add the function
pushToTeXworks.setCommandPath("/usr/bin/texworks");

String[] actualCommand = pushToTeXworks.getCommandLine(keyString);

Expand All @@ -101,7 +99,7 @@ void getCommandLine() {
*
* Method: pushEntries()
*
* [Precondition]: TeXworks should be running in the background
* [Precondition]: TeXworks must run in the background
*/
@Disabled("Disabled as it needs running TeXworks in the background. Start TeXworks with &")
@Test
Expand Down

0 comments on commit b5a4f2a

Please sign in to comment.