Skip to content

Conversation

@jacobperron
Copy link
Contributor

Mockito is a "tasty" mocking framework for unit tests in Java.

https://site.mockito.org/

I'd like to use mockito in some ROS 2 Java unit tests.

@jacobperron jacobperron requested a review from a team as a code owner August 25, 2020 21:14
jacobperron added a commit to osrf/ros2_java that referenced this pull request Aug 25, 2020
@mabelzhang mabelzhang added the rosdep Issue/PR is for a rosdep key label Aug 26, 2020
@jacobperron jacobperron requested a review from ahcorde August 27, 2020 00:01
Copy link
Contributor

@ahcorde ahcorde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Signed-off-by: Jacob Perron <[email protected]>
@jacobperron jacobperron merged commit 28b5e22 into ros:master Aug 27, 2020
@jacobperron jacobperron deleted the mockito branch August 27, 2020 19:18
jacobperron added a commit to osrf/ros2_java that referenced this pull request Sep 17, 2020
* Notify clocks when use_sim_time parameter changes

Signed-off-by: Jacob Perron <[email protected]>

* Add unit tests for TimeSource class

Introduce Mockito dependency to help with creating mock objects.

Signed-off-by: Jacob Perron <[email protected]>

* Add test dependency on libmockito-java

Depends on ros/rosdistro#26308

Signed-off-by: Jacob Perron <[email protected]>

* Minor refactor

- Switch to using @mock annotation.
- Cleanup

Signed-off-by: Jacob Perron <[email protected]>

* Depend on mockito_vendor package

Signed-off-by: Jacob Perron <[email protected]>

* Add mockito_vendor to repos file

This should make CI green.

Signed-off-by: Jacob Perron <[email protected]>

* Update branch for mockito_vendor

Signed-off-by: Jacob Perron <[email protected]>
jacobperron added a commit to osrf/ros2_java that referenced this pull request Sep 18, 2020
* Notify clocks when use_sim_time parameter changes

Signed-off-by: Jacob Perron <[email protected]>

* Add unit tests for TimeSource class

Introduce Mockito dependency to help with creating mock objects.

Signed-off-by: Jacob Perron <[email protected]>

* Add test dependency on libmockito-java

Depends on ros/rosdistro#26308

Signed-off-by: Jacob Perron <[email protected]>

* Minor refactor

- Switch to using @mock annotation.
- Cleanup

Signed-off-by: Jacob Perron <[email protected]>

* Depend on mockito_vendor package

Signed-off-by: Jacob Perron <[email protected]>

* Add mockito_vendor to repos file

This should make CI green.

Signed-off-by: Jacob Perron <[email protected]>

* Update branch for mockito_vendor

Signed-off-by: Jacob Perron <[email protected]>
jacobperron added a commit to osrf/ros2_java that referenced this pull request Sep 18, 2020
* Notify clocks when use_sim_time parameter changes

Signed-off-by: Jacob Perron <[email protected]>

* Add unit tests for TimeSource class

Introduce Mockito dependency to help with creating mock objects.

Signed-off-by: Jacob Perron <[email protected]>

* Add test dependency on libmockito-java

Depends on ros/rosdistro#26308

Signed-off-by: Jacob Perron <[email protected]>

* Minor refactor

- Switch to using @mock annotation.
- Cleanup

Signed-off-by: Jacob Perron <[email protected]>

* Depend on mockito_vendor package

Signed-off-by: Jacob Perron <[email protected]>

* Add mockito_vendor to repos file

This should make CI green.

Signed-off-by: Jacob Perron <[email protected]>

* Update branch for mockito_vendor

Signed-off-by: Jacob Perron <[email protected]>
jacobperron added a commit to osrf/ros2_java that referenced this pull request Sep 18, 2020
* Notify clocks when use_sim_time parameter changes

Signed-off-by: Jacob Perron <[email protected]>

* Add unit tests for TimeSource class

Introduce Mockito dependency to help with creating mock objects.

Signed-off-by: Jacob Perron <[email protected]>

* Add test dependency on libmockito-java

Depends on ros/rosdistro#26308

Signed-off-by: Jacob Perron <[email protected]>

* Minor refactor

- Switch to using @mock annotation.
- Cleanup

Signed-off-by: Jacob Perron <[email protected]>

* Depend on mockito_vendor package

Signed-off-by: Jacob Perron <[email protected]>

* Add mockito_vendor to repos file

This should make CI green.

Signed-off-by: Jacob Perron <[email protected]>

* Update branch for mockito_vendor

Signed-off-by: Jacob Perron <[email protected]>
jacobperron added a commit to osrf/ros2_java that referenced this pull request Sep 18, 2020
* Notify clocks when use_sim_time parameter changes

Signed-off-by: Jacob Perron <[email protected]>

* Add unit tests for TimeSource class

Introduce Mockito dependency to help with creating mock objects.

Signed-off-by: Jacob Perron <[email protected]>

* Add test dependency on libmockito-java

Depends on ros/rosdistro#26308

Signed-off-by: Jacob Perron <[email protected]>

* Minor refactor

- Switch to using @mock annotation.
- Cleanup

Signed-off-by: Jacob Perron <[email protected]>

* Depend on mockito_vendor package

Signed-off-by: Jacob Perron <[email protected]>

* Add mockito_vendor to repos file

This should make CI green.

Signed-off-by: Jacob Perron <[email protected]>

* Update branch for mockito_vendor

Signed-off-by: Jacob Perron <[email protected]>
ivanpauno pushed a commit to osrf/ros2_java that referenced this pull request May 17, 2021
* Notify clocks when use_sim_time parameter changes

Signed-off-by: Jacob Perron <[email protected]>

* Add unit tests for TimeSource class

Introduce Mockito dependency to help with creating mock objects.

Signed-off-by: Jacob Perron <[email protected]>

* Add test dependency on libmockito-java

Depends on ros/rosdistro#26308

Signed-off-by: Jacob Perron <[email protected]>

* Minor refactor

- Switch to using @mock annotation.
- Cleanup

Signed-off-by: Jacob Perron <[email protected]>

* Depend on mockito_vendor package

Signed-off-by: Jacob Perron <[email protected]>

* Add mockito_vendor to repos file

This should make CI green.

Signed-off-by: Jacob Perron <[email protected]>

* Update branch for mockito_vendor

Signed-off-by: Jacob Perron <[email protected]>
jacobperron added a commit to ros2-java/ros2_java that referenced this pull request May 13, 2022
* Notify clocks when use_sim_time parameter changes

Signed-off-by: Jacob Perron <[email protected]>

* Add unit tests for TimeSource class

Introduce Mockito dependency to help with creating mock objects.

Signed-off-by: Jacob Perron <[email protected]>

* Add test dependency on libmockito-java

Depends on ros/rosdistro#26308

Signed-off-by: Jacob Perron <[email protected]>

* Minor refactor

- Switch to using @mock annotation.
- Cleanup

Signed-off-by: Jacob Perron <[email protected]>

* Depend on mockito_vendor package

Signed-off-by: Jacob Perron <[email protected]>

* Add mockito_vendor to repos file

This should make CI green.

Signed-off-by: Jacob Perron <[email protected]>

* Update branch for mockito_vendor

Signed-off-by: Jacob Perron <[email protected]>
jacobperron added a commit to ros2-java/ros2_java that referenced this pull request May 13, 2022
* Notify clocks when use_sim_time parameter changes

Signed-off-by: Jacob Perron <[email protected]>

* Add unit tests for TimeSource class

Introduce Mockito dependency to help with creating mock objects.

Signed-off-by: Jacob Perron <[email protected]>

* Add test dependency on libmockito-java

Depends on ros/rosdistro#26308

Signed-off-by: Jacob Perron <[email protected]>

* Minor refactor

- Switch to using @mock annotation.
- Cleanup

Signed-off-by: Jacob Perron <[email protected]>

* Depend on mockito_vendor package

Signed-off-by: Jacob Perron <[email protected]>

* Add mockito_vendor to repos file

This should make CI green.

Signed-off-by: Jacob Perron <[email protected]>

* Update branch for mockito_vendor

Signed-off-by: Jacob Perron <[email protected]>
jacobperron added a commit to ros2-java/ros2_java that referenced this pull request May 13, 2022
* Notify clocks when use_sim_time parameter changes

Signed-off-by: Jacob Perron <[email protected]>

* Add unit tests for TimeSource class

Introduce Mockito dependency to help with creating mock objects.

Signed-off-by: Jacob Perron <[email protected]>

* Add test dependency on libmockito-java

Depends on ros/rosdistro#26308

Signed-off-by: Jacob Perron <[email protected]>

* Minor refactor

- Switch to using @mock annotation.
- Cleanup

Signed-off-by: Jacob Perron <[email protected]>

* Depend on mockito_vendor package

Signed-off-by: Jacob Perron <[email protected]>

* Add mockito_vendor to repos file

This should make CI green.

Signed-off-by: Jacob Perron <[email protected]>

* Update branch for mockito_vendor

Signed-off-by: Jacob Perron <[email protected]>
jacobperron added a commit to ros2-java/ros2_java that referenced this pull request May 17, 2022
* Notify clocks when use_sim_time parameter changes

Signed-off-by: Jacob Perron <[email protected]>

* Add unit tests for TimeSource class

Introduce Mockito dependency to help with creating mock objects.

Signed-off-by: Jacob Perron <[email protected]>

* Add test dependency on libmockito-java

Depends on ros/rosdistro#26308

Signed-off-by: Jacob Perron <[email protected]>

* Minor refactor

- Switch to using @mock annotation.
- Cleanup

Signed-off-by: Jacob Perron <[email protected]>

* Depend on mockito_vendor package

Signed-off-by: Jacob Perron <[email protected]>

* Add mockito_vendor to repos file

This should make CI green.

Signed-off-by: Jacob Perron <[email protected]>

* Update branch for mockito_vendor

Signed-off-by: Jacob Perron <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rosdep Issue/PR is for a rosdep key

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants