diff --git a/test/java/foundation/pEp/jniadapter/test/jni129/Makefile b/test/java/foundation/pEp/jniadapter/test/jni129/Makefile deleted file mode 100644 index 51f27d0..0000000 --- a/test/java/foundation/pEp/jniadapter/test/jni129/Makefile +++ /dev/null @@ -1,37 +0,0 @@ -include ../../../../../../../Makefile.conf -include ../Makefile.conf - -TEST_UNIT_NAME=jni129 - -JAVA_CLASSES = \ - TestAlice.class \ - ../utils/AdapterBaseTestContext.class \ - ../utils/AdapterTestUtils.class \ - ../utils/TestCallbacks.class - -.PHONY: pitytest compile alice test clean - -all: alice compile - -pitytest: - $(MAKE) -C $(PITYTEST_DIR) - -alice: compile clean-pep-home-alice - cd $(JAVA_CWD);pwd;HOME=$(JAVA_PEP_HOME_DIR_ALICE) $(JAVA) $(JAVA_PKG_BASENAME).$(TEST_UNIT_NAME).TestAlice - -compile: $(JAVA_CLASSES) pitytest - -%.class: %.java - cd $(JAVA_CWD);javac -cp $(CLASSPATH) $(JAVA_PKG_BASEPATH)/$(TEST_UNIT_NAME)/$< - -clean: - rm -f $(JAVA_CLASSES) - rm -f *.class - rm -f *.log - rm -Rf .gnupg - rm -Rf .lldb - -clean-pep-home: clean-pep-home-alice - -clean-pep-home-alice: - rm -rf $(PEP_HOME_DIR_ALICE)/.pEp diff --git a/test/java/foundation/pEp/jniadapter/test/jni129/TestAlice.java b/test/java/foundation/pEp/jniadapter/test/jni129/TestAlice.java deleted file mode 100644 index 6dcced6..0000000 --- a/test/java/foundation/pEp/jniadapter/test/jni129/TestAlice.java +++ /dev/null @@ -1,109 +0,0 @@ -package foundation.pEp.jniadapter.test.jni129; - -import foundation.pEp.jniadapter.Blob; -import foundation.pEp.jniadapter.Identity; -import foundation.pEp.jniadapter.Message; -import foundation.pEp.jniadapter.test.utils.AdapterBaseTestContext; -import foundation.pEp.pitytest.TestSuite; -import foundation.pEp.pitytest.TestUnit; -import foundation.pEp.pitytest.utils.TestUtils; - -import java.util.Date; -import java.util.Vector; - -class Jni129TestContext extends AdapterBaseTestContext { - @Override - public AdapterBaseTestContext init() throws Throwable { - super.init(); - return this; - } -} - -class TestAlice { - public static void main(String[] args) throws Exception { - TestSuite.getDefault().setVerbose(true); - TestSuite.getDefault().setTestColor(TestUtils.TermColor.GREEN); - - AdapterBaseTestContext jni129Ctx = new Jni129TestContext(); - - new TestUnit("setDir() == getDir() ", new Jni129TestContext(), ctx -> { - Message msg = new Message(); - Message.Direction inVal = ctx.msgDirOutgoing; - msg.setDir(inVal); - Message.Direction outVal = msg.getDir(); - assert outVal == inVal : "\nreturned '" + outVal + "' instead of '" + inVal + "'"; - }); - - new TestUnit("setId() == getId() ", new Jni129TestContext(), ctx -> { - Message msg = new Message(); - String inVal = "23"; - msg.setId(inVal); - String outVal = msg.getId(); - assert outVal.equals(inVal) : "\nreturned '" + outVal + "' instead of '" + inVal + "'"; - }); - - new TestUnit("setShortmsg() == getShortmsg() ", new Jni129TestContext(), ctx -> { - Message msg = new Message(); - String inVal = "23"; - msg.setShortmsg(inVal); - String outVal = msg.getShortmsg(); - assert outVal.equals(inVal) : "\nreturned '" + outVal + "' instead of '" + inVal + "'"; - }); - - new TestUnit("setLongmsg() == getLongmsg() ", new Jni129TestContext(), ctx -> { - Message msg = new Message(); - String inVal = "23"; - msg.setLongmsg(inVal); - String outVal = msg.getLongmsg(); - assert outVal.equals(inVal) : "\nreturned '" + outVal + "' instead of '" + inVal + "'"; - }); - - new TestUnit("setLongmsgFormatted() == getLongmsgFormatted() ", new Jni129TestContext(), ctx -> { - Message msg = new Message(); - String inVal = "23"; - msg.setLongmsgFormatted(inVal); - String outVal = msg.getLongmsgFormatted(); - assert outVal.equals(inVal) : "\nreturned '" + outVal + "' instead of '" + inVal + "'"; - }); - - new TestUnit("setAttachments() == getAttachments() ", new Jni129TestContext(), ctx -> { - Message msg = new Message(); - Vector inVal = ctx.attachments; - msg.setAttachments(inVal); - Vector outVal = msg.getAttachments(); - for (int i = 0; i < 3; i++) { - Blob inElem = inVal.get(i); - Blob outElem = outVal.get(i); - assert inElem == inElem : "\nreturned '" + outElem + "' instead of '" + inElem + "'"; - } - }); - - new TestUnit("setSent() == getSent() ", new Jni129TestContext(), ctx -> { - Message msg = new Message(); - Date inVal = new Date(); - msg.setSent(inVal); - Date outVal = msg.getSent(); - assert outVal == inVal : "\nreturned '" + outVal + "' instead of '" + inVal + "'"; - }); - - new TestUnit("setRecv() == getRecv() ", new Jni129TestContext(), ctx -> { - Message msg = new Message(); - Date inVal = new Date(); - msg.setRecv(inVal); - Date outVal = msg.getRecv(); - assert outVal == inVal : "\nreturned '" + outVal + "' instead of '" + inVal + "'"; - }); - - new TestUnit("setFrom() == getFrom() ", new Jni129TestContext(), ctx -> { - Message msg = new Message(); - Identity inVal = ctx.alice; - msg.setFrom(inVal); - Identity outVal = msg.getFrom(); - assert outVal.equals(inVal) : "\nreturned '" + outVal + "'\nexpected '" + inVal + "'"; - }); - - TestSuite.getDefault().run(); - } -} - -