This repository was archived by the owner on Apr 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJudgeControllerDiffblueTest.java
More file actions
42 lines (38 loc) · 2.61 KB
/
JudgeControllerDiffblueTest.java
File metadata and controls
42 lines (38 loc) · 2.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package com.example.codeE.controller;
import java.io.IOException;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
class JudgeControllerDiffblueTest {
/**
* Method under test: {@link JudgeController#exampleRq()}
*/
@Test
@Disabled("TODO: Complete this test")
void testExampleRq() throws IOException {
// TODO: Diffblue Cover was only able to create a partial test for this method:
// Reason: No inputs found that don't throw a trivial exception.
// Diffblue Cover tried to run the arrange/act section, but the method under
// test threw
// jakarta.servlet.ServletException: Request processing failed: org.bson.BsonInvalidOperationException: writeEndDocument can only be called when State is NAME, not when State is VALUE
// at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:590)
// at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658)
// org.bson.BsonInvalidOperationException: writeEndDocument can only be called when State is NAME, not when State is VALUE
// at org.bson.AbstractBsonWriter.throwInvalidState(AbstractBsonWriter.java:747)
// at org.bson.AbstractBsonWriter.checkPreconditions(AbstractBsonWriter.java:702)
// at org.bson.AbstractBsonWriter.writeEndDocument(AbstractBsonWriter.java:295)
// at com.mongodb.client.model.Updates$SimpleUpdate.toBsonDocument(Updates.java:513)
// at com.mongodb.internal.operation.Operations.toBsonDocument(Operations.java:754)
// at com.mongodb.internal.operation.Operations.findOneAndUpdate(Operations.java:355)
// at com.mongodb.internal.operation.SyncOperations.findOneAndUpdate(SyncOperations.java:168)
// at com.mongodb.client.internal.MongoCollectionImpl.executeFindOneAndUpdate(MongoCollectionImpl.java:761)
// at com.mongodb.client.internal.MongoCollectionImpl.findOneAndUpdate(MongoCollectionImpl.java:741)
// at com.mongodb.client.internal.MongoCollectionImpl.findOneAndUpdate(MongoCollectionImpl.java:735)
// at com.example.codeE.helper.AutoIncrement.getNextSequence(AutoIncrement.java:18)
// at com.example.codeE.controller.JudgeController.exampleRq(JudgeController.java:40)
// at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:590)
// at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658)
// See https://diff.blue/R013 to resolve this issue.
// Arrange and Act
(new JudgeController()).exampleRq();
}
}