Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

Commit

Permalink
Tests: remove oleaster-matcher dependency
Browse files Browse the repository at this point in the history
junit serves all needed functionalities
  • Loading branch information
Pawel Karczewski committed Nov 24, 2020
1 parent e04ca43 commit 5b70e83
Show file tree
Hide file tree
Showing 5 changed files with 130 additions and 153 deletions.
17 changes: 0 additions & 17 deletions NOTICES.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,6 @@ available under the terms of the Eclipse Public License v1.0 which accompanies
this distribution, and is available at:
https://www.eclipse.org/legal/epl-v10.html

### Oleaster Matcher

https://github.com/mscharhag/oleaster/tree/master/oleaster-matcher

Used under Apache License, Version 2

Copyright © 2014 Michael Scharhag

Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this software except in compliance with the License. You may obtain a copy of
the License here: https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.

### OpenJDK

https://openjdk.java.net
Expand Down
6 changes: 0 additions & 6 deletions src/main/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,6 @@
</build>

<dependencies>
<dependency>
<groupId>com.mscharhag.oleaster</groupId>
<artifactId>oleaster-matcher</artifactId>
<version>0.2.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand Down
14 changes: 7 additions & 7 deletions src/test/java/io/pmem/pmemkv/tests/CmapTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import io.pmem.pmemkv.ByteBufferConverter;

import org.junit.Assert;
import static org.junit.Assert.*;
import org.junit.Test;
import org.junit.Before;
import org.junit.After;
Expand All @@ -19,7 +20,6 @@
import java.nio.ByteBuffer;
import java.util.concurrent.atomic.AtomicInteger;

import static com.mscharhag.oleaster.matcher.Matchers.expect;
import static java.nio.charset.StandardCharsets.UTF_8;
import static junit.framework.TestCase.fail;

Expand Down Expand Up @@ -65,18 +65,18 @@ public void testCreateAndOpen() {
String file = folder.getRoot() + File.pathSeparator + "testfile";
Database<ByteBuffer, ByteBuffer> db = createDB(ENGINE, file);

expect(db.exists(stringToByteBuffer("key1"))).toBeFalse();
assertFalse(db.exists(stringToByteBuffer("key1")));
db.put(stringToByteBuffer("key1"), stringToByteBuffer("value1"));
expect(db.exists(stringToByteBuffer("key1"))).toBeTrue();
assertTrue(db.exists(stringToByteBuffer("key1")));
ByteBuffer resBuff = db.getCopy(stringToByteBuffer("key1"));
expect(byteBufferToString(resBuff)).toEqual("value1");
assertEquals(byteBufferToString(resBuff), "value1");

db.stop();

db = openDB(ENGINE, file);
expect(db.exists(stringToByteBuffer("key1"))).toBeTrue();
assertTrue(db.exists(stringToByteBuffer("key1")));
resBuff = db.getCopy(stringToByteBuffer("key1"));
expect(byteBufferToString(resBuff)).toEqual("value1");
assertEquals(byteBufferToString(resBuff), "value1");
}

@Test
Expand All @@ -92,6 +92,6 @@ public void throwsExceptionOnStartWhenOpeningNonExistentFile() {

}

expect(db).toEqual(null);
assertNull(db);
}
}
Loading

0 comments on commit 5b70e83

Please sign in to comment.