PAN-52 Fixed issue with the Theorems API
This commit is contained in:
+3
@@ -34,6 +34,7 @@ public class ProofsIntegrationTest {
|
||||
assertEquals("Test proof", savedProof.getTheoremName());
|
||||
assertEquals("Test branch", savedProof.getBranch());
|
||||
assertEquals("test", savedProof.getProof());
|
||||
assertEquals(Integer.valueOf(1), savedProof.getTheorem());
|
||||
assertNotNull(savedProof.getDateCreated());
|
||||
assertNotNull(savedProof.getLastUpdated());
|
||||
assertEquals(2, savedProof.getReferencedTheorems().size());
|
||||
@@ -52,6 +53,7 @@ public class ProofsIntegrationTest {
|
||||
assertEquals("Test proof", updatedProof.getTheoremName());
|
||||
assertEquals("Test Update", updatedProof.getBranch());
|
||||
assertEquals("test", updatedProof.getProof());
|
||||
assertEquals(Integer.valueOf(1), savedProof.getTheorem());
|
||||
assertNotNull(updatedProof.getLastUpdated());
|
||||
assertNotNull(updatedProof.getDateCreated());
|
||||
assertNotEquals(updatedProof.getDateCreated().toInstant(), updatedProof.getLastUpdated().toInstant());
|
||||
@@ -80,6 +82,7 @@ public class ProofsIntegrationTest {
|
||||
final Proof proof = new Proof();
|
||||
proof.setTheoremName("Test proof");
|
||||
proof.setProof("test");
|
||||
proof.setTheorem(1);
|
||||
proof.setBranch("Test branch");
|
||||
proof.setDateCreated(new Date());
|
||||
proof.setReferencedTheorems(referencedTheoremsList);
|
||||
|
||||
@@ -26,6 +26,8 @@ public class Proof extends BaseDto implements Serializable {
|
||||
@NotNull(groups = Insert.class)
|
||||
@Size(min = 1, max = 4096, message = "The proof must be at least 1 character and at most 4096 characters")
|
||||
private String proof;
|
||||
@NotNull(groups = Insert.class)
|
||||
private Integer theorem;
|
||||
@NotBlank(groups = Insert.class)
|
||||
@Size(min = 1, max = 512, message = "The branch must be at least 1 character and at most 512 characters")
|
||||
private String branch;
|
||||
|
||||
+1
@@ -298,6 +298,7 @@ public class ProofControllerTest {
|
||||
|
||||
final Proof proof = new Proof();
|
||||
proof.setTheoremName("Test proof");
|
||||
proof.setTheorem(1);
|
||||
proof.setBranch("Test branch");
|
||||
proof.setProof("test proof");
|
||||
proof.setDateCreated(new Date());
|
||||
|
||||
Reference in New Issue
Block a user