Skip to content

Commit

Permalink
Fixed code smell
Browse files Browse the repository at this point in the history
  • Loading branch information
w3stling committed Aug 8, 2022
1 parent eb7b804 commit e5142f7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ else if ("Konvertibel".equals(instrumentType) || "Convertible".equals(instrument
else if ("Obligation".equals(instrumentType) || "Bond".equals(instrumentType) || "InstrumentTyp7".equals(instrumentType)) {
type = BOND;
}
else if ("Option".equals(instrumentType) || "Option".equals(instrumentType) || "InstrumentTyp8".equals(instrumentType)) {
else if ("Option".equals(instrumentType) || "InstrumentTyp8".equals(instrumentType)) {
type = OPTION;
}
else if ("Teckningsoption".equals(instrumentType) || "Subscription warrant".equals(instrumentType) || "InstrumentTyp11".equals(instrumentType)) {
Expand All @@ -619,7 +619,7 @@ else if ("Teckningsrätt/Uniträtt".equals(instrumentType) || "Subscription righ
else if ("Terminer".equals(instrumentType) || "Future/Forward".equals(instrumentType) || "InstrumentTyp13".equals(instrumentType)) {
type = FUTURE_FORWARD;
}
else if ("Warrant".equals(instrumentType) || "Warrant".equals(instrumentType) || "InstrumentTyp14".equals(instrumentType)) {
else if ("Warrant".equals(instrumentType) || "InstrumentTyp14".equals(instrumentType)) {
type = WARRANT;
}
else if ("Övriga derivatkontrakt".equals(instrumentType) || "Other derivative contracts".equals(instrumentType) || "InstrumentTyp15".equals(instrumentType)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,14 @@ void getIssuer_EmptyString() throws IOException {
}

@Test
public void getIssuer_null() {
void getIssuer_null() {
assertThrows(IllegalArgumentException.class, () ->
FreeTextQueryBuilder.issuer(null).build());
}


@Test
public void getPDMR_Jo() throws IOException {
void getPDMR_Jo() throws IOException {
FreeTextQuery query = FreeTextQueryBuilder.pdmr("Jo").build();

Insynsregistret ir = new Insynsregistret();
Expand All @@ -101,20 +101,20 @@ public void getPDMR_Jo() throws IOException {


@Test
public void getPDMR_null() {
void getPDMR_null() {
assertThrows(IllegalArgumentException.class, () ->
FreeTextQueryBuilder.pdmr(null).build());
}


@Test
public void freeTestQueryNullParams() throws IOException {
void freeTestQueryNullParams() throws IOException {
FreeTextQuery query = new FreeTextQuery(null, null);
assertEquals("", query.getUrl());
}

@Test
public void badResponse() throws IOException {
void badResponse() throws IOException {
BufferedReader reader = new BufferedReader(new StringReader("[\"Test1\",\"Test2\",\"Test3]"));

Insynsregistret mock = spy(Insynsregistret.class);
Expand All @@ -126,7 +126,7 @@ public void badResponse() throws IOException {
}

@Test
public void emptyResponse() throws IOException {
void emptyResponse() throws IOException {
BufferedReader reader = new BufferedReader(new StringReader("[]"));

Insynsregistret mock = spy(Insynsregistret.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ void badTransactionFromDate() {
LocalDate to = LocalDate.of(2018, 3,1);

assertThrows(IllegalArgumentException.class, () ->
TransactionQueryBuilder.transactions(from, to).build());
TransactionQueryBuilder.transactions(from, to));
}

@Test
Expand All @@ -75,7 +75,7 @@ void badTransactionToDate() {
@Test
void badTransactionPastDays() {
assertThrows(IllegalArgumentException.class, () ->
TransactionQueryBuilder.transactionsLastDays(-1).build());
TransactionQueryBuilder.transactionsLastDays(-1));
}


Expand Down

0 comments on commit e5142f7

Please sign in to comment.