Closed
Description
Description
Empty test class is generated for Socket.connect with added permissions for Java Security manager
**Steps to reproduce
- Add the following file to the ~/.utbot : sandbox.policy:
grant {
permission java.net.SocketPermission "*", "connect";
};
- Generate tests with Symbolic engine 95% (default settings) for the following code:
public int connect(Socket socket) throws IOException {
socket.connect(new InetSocketAddress("0.0.0.0", 22));
return 0;
}
Expected behavior
There are some test methods inside the generated class.
Or - there is an error message that no tests were generated - see Additional context
Actual behavior
Empty test class is generated - without comments.
Visual proofs
public final class ATest {
}
Additional context
If Symbolic execution method is set to 100% (File > Settings > Tools > UnitTestBot), there are no tests generated and error message is shown:
Originally posted by @alisevych in #1425 (comment)
Metadata
Metadata
Assignees
Type
Projects
Status
Done