Skip to content

Commit 9446b7d

Browse files
committed
Switch back to camelcase
- fix call in test from "setTotal" to "setTotalRecords" Resolves #682 (comment).
1 parent ad7ae5f commit 9446b7d

File tree

2 files changed

+13
-15
lines changed

2 files changed

+13
-15
lines changed

metafacture-io/src/main/java/org/metafacture/io/SruOpener.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,10 @@ public SruOpener() {
9292
/**
9393
* Sets the User Agent to use. <strong>Default value: {@value USER_AGENT}</strong>.
9494
*
95-
* @param useragent a user agent to be used when opening a URL
95+
* @param userAgent a user agent to be used when opening a URL
9696
*/
97-
public void setUserAgent(final String useragent) {
98-
userAgent = useragent;
97+
public void setUserAgent(final String userAgent) {
98+
this.userAgent = userAgent;
9999
}
100100

101101
/**
@@ -113,29 +113,29 @@ public void setQuery(final String query) {
113113
* Sets total number of records to be retrieved. <strong>Default value: indefinite (as in "all")
114114
* </strong>.
115115
*
116-
* @param totalrecords total number of records to be retrieved
116+
* @param totalRecords total number of records to be retrieved
117117
*/
118118
public void setTotalRecords(final int totalRecords) {
119-
totalRecords = totalrecords;
119+
this.totalRecords = totalRecords;
120120
}
121121

122122
/**
123123
* Sets the maximum of records returned in one lookup. <strong>Default value: {@value MAXIMUM_RECORDS}</strong>.
124124
* The lookup is repeated as long as {@link #maximumRecords} is less than {@link #totalRecords}.
125125
*
126-
* @param maximumrecords maximum of records returned in one lookup
126+
* @param maximumRecords maximum of records returned in one lookup
127127
*/
128-
public void setMaximumRecords(final int maximumrecords) {
129-
maximumRecords = maximumrecords;
128+
public void setMaximumRecords(final int maximumRecords) {
129+
this.maximumRecords = maximumRecords;
130130
}
131131

132132
/**
133133
* Sets where to start when retrieving records. <strong>Default value: {@value START_RECORD}</strong>.
134134
*
135-
* @param startrecord where to start when retrieving records
135+
* @param startRecord where to start when retrieving records
136136
*/
137-
public void setStartRecord(final int startrecord) {
138-
startRecord = startrecord;
137+
public void setStartRecord(final int startRecord) {
138+
this.startRecord = startRecord;
139139
}
140140

141141
/**

metafacture-io/src/test/java/org/metafacture/io/SruOpenerTest.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,12 @@
2121
import org.junit.Before;
2222
import org.junit.Rule;
2323
import org.junit.Test;
24-
import org.metafacture.framework.MetafactureException;
2524
import org.metafacture.framework.ObjectReceiver;
2625
import org.metafacture.framework.helpers.DefaultObjectPipe;
2726
import org.mockito.Mock;
2827
import org.mockito.junit.MockitoJUnit;
2928
import org.mockito.junit.MockitoRule;
3029

31-
import java.io.BufferedReader;
3230
import java.io.IOException;
3331
import java.io.Reader;
3432

@@ -85,7 +83,7 @@ public void test_(){
8583
sruOpener.setVersion("1.1");
8684
sruOpener.setStartRecord(1890);
8785
sruOpener.setMaximumRecords(1);
88-
sruOpener.setTotal(3);
86+
sruOpener.setTotalRecords(3);
8987
sruOpener.process("https://services.dnb.de/sru/dnb");
9088
System.out.println(resultCollector.toString());
9189
}
@@ -186,7 +184,7 @@ public void process(final XmlReceiver obj) {
186184
sruOpener.setVersion("1.1");
187185
sruOpener.setStartRecord(3029);
188186
sruOpener.setMaximumRecords(1);
189-
sruOpener.setTotal(1);
187+
sruOpener.setTotalRecords(1);
190188
// sruOpener.process("https://services.dnb.de/sru/dnb");
191189
sruOpener.process("https://services.dnb.de/sru/zdb");
192190
// sruOpener.process("https://amsquery.stadt-zuerich.ch/sru/");

0 commit comments

Comments
 (0)