Closed satorstefan closed 5 months ago
For some reason, that dependency mock-servlet-environment5 is not (yet) available in version 2.1.5. You could try adding the dependency in version 2.1.4 to your project explicitely. Personally I am just staying on version 2.1.4 for the time being.
That's true. The mock-servlet-environment5 and mock-servlet-environment held fake classes implementing bits of jakarta.servlet and javax.servlet respectively. They were almost identical yet present in two distinct KaribuTesting branches, master and 1.4.0, duplicating maintenance efforts.
I've extracted the library to https://github.com/mvysny/fake-servlet which KaribuTesting pulls in as a dependency. The classes were renamed to FakeSession and such, however there should still be deprecated typealiases for MockSession classes.
In short, the mock-servlet-environment5 dependency was replaced by the fake-servlet5 dependency, and you shouldn't really notice any difference.
import com.github.mvysny.kaributesting.mockhttp.MockRequest;
Here the class is still there:
Thats how I use it currently: