fixing the typos in read me doc and test classes

This commit is contained in:
Kranti Parisa
2014-12-18 11:08:41 -08:00
parent a6926bfe4b
commit 8f717efced
4 changed files with 11 additions and 10 deletions
+1
View File
@@ -8,3 +8,4 @@
*.war
*.ear
*.iml
.idea*
+1 -1
View File
@@ -356,7 +356,7 @@ These methods let you provide the object which the data will be written to, but
``` java
CharSequence using = new StringBuilder();
CharSequence myResult = map.getUsing("key", using);
// at this point the myString and myResult will both point to the same object
// at this point "using" and "myResult" will both point to the same object
```
The `map.getUsing()` method is similar to `map.get()`, but because Chronicle Map stores its data off
@@ -63,10 +63,10 @@ public class CHMUseCasesTest {
}
static class PrefixStingFunction implements Function<String, String> {
static class PrefixStringFunction implements Function<String, String> {
private final String prefix;
public PrefixStingFunction(@NotNull String prefix) {
public PrefixStringFunction(@NotNull String prefix) {
this.prefix = prefix;
}
@@ -77,8 +77,8 @@ public class CHMUseCasesTest {
@Override
public boolean equals(Object obj) {
return obj instanceof PrefixStingFunction &&
prefix.equals(((PrefixStingFunction) obj).prefix);
return obj instanceof PrefixStringFunction &&
prefix.equals(((PrefixStringFunction) obj).prefix);
}
@Override
@@ -121,8 +121,8 @@ public class CHMUseCasesTest {
map.put("Hello", "World");
assertEquals("World", map.get("Hello"));
assertEquals("New World", map.getMapped("Hello", new PrefixStingFunction("New ")));
assertEquals(null, map.getMapped("No key", new PrefixStingFunction("New ")));
assertEquals("New World", map.getMapped("Hello", new PrefixStringFunction("New ")));
assertEquals(null, map.getMapped("No key", new PrefixStringFunction("New ")));
}
}
@@ -34,15 +34,15 @@ import static org.junit.Assert.assertEquals;
public class SerializerTest {
@Test
public void testPrefixStingFunctionSerialization() throws Exception {
public void testPrefixStringFunctionSerialization() throws Exception {
ByteBufferBytes b = new ByteBufferBytes(ByteBuffer.allocate(512));
CHMUseCasesTest.PrefixStingFunction expected = new CHMUseCasesTest.PrefixStingFunction("New ");
CHMUseCasesTest.PrefixStringFunction expected = new CHMUseCasesTest.PrefixStringFunction("New ");
b.writeObject(expected);
b.clear();
CHMUseCasesTest.PrefixStingFunction actual = b.readObject(CHMUseCasesTest.PrefixStingFunction.class);
CHMUseCasesTest.PrefixStringFunction actual = b.readObject(CHMUseCasesTest.PrefixStringFunction.class);
assertEquals(expected, actual);
}