Skip to content

Commit

Permalink
Fix checkstyle errors
Browse files Browse the repository at this point in the history
  • Loading branch information
marcus-ny committed Apr 14, 2024
1 parent 1609c84 commit 7bb4dff
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 40 deletions.
3 changes: 2 additions & 1 deletion src/main/java/seedu/address/logic/LogicManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@
import seedu.address.model.analytics.DashboardData;
import seedu.address.model.person.Loan;
import seedu.address.model.person.Person;
import seedu.address.storage.Storage;
import seedu.address.model.tabindicator.TabIndicator;
import seedu.address.storage.Storage;


/**
* The main LogicManager of the app.
Expand Down
5 changes: 0 additions & 5 deletions src/main/java/seedu/address/model/Model.java
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,6 @@ public interface Model {
*/
void setIsAnalyticsTab(Boolean isAnalyticsTab);

/**
* Sets the tab to the person tab.
*
* @param isPersonTab
*/
void setToPersonTab();

void markLoan(Loan loanToMark);
Expand Down
12 changes: 8 additions & 4 deletions src/main/java/seedu/address/model/tabindicator/TabIndicator.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,11 @@ public boolean getIsAnalyticsTab() {

public TabIndicator setIsAnalyticsTab(boolean newIsAnalyticsTab) {
if (newIsAnalyticsTab) {
return new TabIndicator(false, newIsAnalyticsTab, false, this.isShowAllLoans, this.isShowLoaneeInfo);
return new TabIndicator(false, newIsAnalyticsTab, false,
this.isShowAllLoans, this.isShowLoaneeInfo);
}
return new TabIndicator(this.isLoansTab, newIsAnalyticsTab, this.isPersonTab, this.isShowAllLoans, this.isShowLoaneeInfo);
return new TabIndicator(this.isLoansTab, newIsAnalyticsTab, this.isPersonTab,
this.isShowAllLoans, this.isShowLoaneeInfo);
}

public boolean getIsPersonTab() {
Expand All @@ -58,9 +60,11 @@ public boolean getIsPersonTab() {

public TabIndicator setIsPersonTab(boolean newIsPersonTab) {
if (newIsPersonTab) {
return new TabIndicator(false, false, newIsPersonTab, this.isShowAllLoans, this.isShowLoaneeInfo);
return new TabIndicator(false, false, newIsPersonTab,
this.isShowAllLoans, this.isShowLoaneeInfo);
}
return new TabIndicator(this.isLoansTab, this.isAnalyticsTab, newIsPersonTab, this.isShowAllLoans, this.isShowLoaneeInfo);
return new TabIndicator(this.isLoansTab, this.isAnalyticsTab, newIsPersonTab,
this.isShowAllLoans, this.isShowLoaneeInfo);
}

public boolean getIsShowAllLoans() {
Expand Down
33 changes: 3 additions & 30 deletions src/test/java/seedu/address/logic/commands/AddCommandTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.function.Predicate;

import org.junit.jupiter.api.Test;

import javafx.beans.property.BooleanProperty;
import javafx.beans.property.ObjectProperty;
import javafx.collections.ObservableList;
import seedu.address.commons.core.GuiSettings;
Expand All @@ -29,6 +27,7 @@
import seedu.address.model.person.Analytics;
import seedu.address.model.person.Loan;
import seedu.address.model.person.Person;
import seedu.address.model.tabindicator.TabIndicator;
import seedu.address.testutil.PersonBuilder;

public class AddCommandTest {
Expand Down Expand Up @@ -169,12 +168,6 @@ public void updateFilteredPersonList(Predicate<Person> predicate) {
throw new AssertionError("This method should not be called.");
}


@Override
public void setLoanList(List<Loan> loanList) {
throw new AssertionError("This method should not be called.");
}

@Override
public ObservableList<Loan> getSortedLoanList() {
throw new AssertionError("This method should not be called.");
Expand All @@ -190,11 +183,6 @@ public void updateFilteredLoanList(Predicate<Loan> predicate, boolean isShowAllL
throw new AssertionError("This method should not be called.");
}

@Override
public BooleanProperty getIsLoansTab() {
throw new AssertionError("This method should not be called.");
}

@Override
public void setIsLoansTab(Boolean isLoansTab) {
throw new AssertionError("This method should not be called.");
Expand All @@ -215,28 +203,18 @@ public ObjectProperty<DashboardData> getDashboardData() {
throw new AssertionError("This method should not be called.");
}

@Override
public BooleanProperty getIsPersonTab() {
throw new AssertionError("This method should not be called.");
}

@Override
public void setIsPersonTab(Boolean isPersonTab) {
throw new AssertionError("This method should not be called.");
}

@Override
public void setDualPanel() {
throw new AssertionError("This method should not be called.");
}

@Override
public BooleanProperty getIsShowLoaneeInfo() {
public void setIsShowLoaneeInfo(Boolean isShowLoaneeInfo) {
throw new AssertionError("This method should not be called.");
}

@Override
public void setIsShowLoaneeInfo(Boolean isShowLoaneeInfo) {
public ObjectProperty<TabIndicator> getTabIndicator() {
throw new AssertionError("This method should not be called.");
}

Expand All @@ -260,11 +238,6 @@ public void setIsAnalyticsTab(Boolean isAnalyticsTab) {
throw new AssertionError("This method should not be called.");
}

@Override
public BooleanProperty getIsAnalyticsTab() {
throw new AssertionError("This method should not be called.");
}

@Override
public void setToPersonTab() {
throw new AssertionError("This method should not be called.");
Expand Down

0 comments on commit 7bb4dff

Please sign in to comment.