Skip to content

Commit 954d5f0

Browse files
author
Majid Mallis
committed
Unit test syntax is only compliant with Java8. Also TravisCI is missing file write rights
1 parent 1d5a6e1 commit 954d5f0

2 files changed

Lines changed: 13 additions & 15 deletions

File tree

.travis.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
sudo: required
1+
sudo: false
22
install: true
33

44
language: java
@@ -12,7 +12,5 @@ notifications:
1212

1313
jdk:
1414
- oraclejdk8
15-
- oraclejdk7
16-
- openjdk6
1715

1816
script: mvn test

src/test/java/SdkUnitTests.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ public class SdkUnitTests {
4444
//public static final String BaseUrl = "http://dsv010331a/restapi";
4545

4646
public static final String SignTest1File = "/src/test//docs/SignTest1.pdf";
47-
public static final String TemplateId = "cf2a46c2-xxxx-xxxx-xxxx-752547b1a419";
48-
public static String EnvelopeId = "1b8f7f80-80c7-423b-9849-5892f59f71b9"; // JUnit 4.12 runs test cases in parallel, so the envelope ID needs to be initiated as well.
47+
public static final String TemplateId = "dc9b2bfd-1c4d-4a82-b17d-b1fd14b10e74";
48+
public static String EnvelopeId = "d27ca8b1-1466-4f17-a96d-38a798ef54b2"; // JUnit 4.12 runs test cases in parallel, so the envelope ID needs to be initiated as well.
4949

5050
// private JSON json = new JSON();
5151

@@ -671,8 +671,8 @@ public void DownLoadEnvelopeDocumentsTest()
671671
System.out.println("EnvelopeSummary: " + envelopeSummary);
672672

673673
byte[] pdfBytes = envelopesApi.getDocument(accountId, EnvelopeId, "combined");
674-
675-
try
674+
Assert.assertTrue(pdfBytes.length > 0);
675+
/*try
676676
{
677677
678678
File pdfFile = File.createTempFile("ds_", "pdf", null);
@@ -688,7 +688,7 @@ public void DownLoadEnvelopeDocumentsTest()
688688
{
689689
Assert.fail("Could not create pdf File");
690690
691-
}
691+
}*/
692692

693693
}
694694
catch (ApiException ex)
@@ -863,9 +863,9 @@ public void GetDiagnosticLogsTest()
863863
System.out.println("EnvelopeSummary: " + envelopeSummary);
864864

865865
byte[] pdfBytes = envelopesApi.getDocument(accountId, envelopeSummary.getEnvelopeId(), "combined");
866-
866+
Assert.assertTrue(pdfBytes.length > 0);
867867

868-
try
868+
/*try
869869
{
870870
871871
File pdfFile = File.createTempFile("ds_", "pdf", null);
@@ -881,13 +881,15 @@ public void GetDiagnosticLogsTest()
881881
{
882882
Assert.fail("Could not create pdf File");
883883
884-
}
884+
}*/
885885

886886

887887
ApiRequestLogsResult logsList = diagApi.listRequestLogs();
888888
String requestLogId = logsList.getApiRequestLogs().get(0).getRequestLogId();
889889
byte[] diagBytes = diagApi.getRequestLog(requestLogId);
890-
try
890+
Assert.assertTrue(diagBytes.length > 0);
891+
892+
/*try
891893
{
892894
893895
File diagFile = File.createTempFile("ds_", "txt", null);
@@ -903,9 +905,7 @@ public void GetDiagnosticLogsTest()
903905
{
904906
Assert.fail("Could not create diag log File");
905907
906-
}
907-
908-
908+
}*/
909909

910910

911911
}

0 commit comments

Comments
 (0)