home.social

#gmock — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #gmock, aggregated by home.social.

  1. Okay, so when using #gtest / #gmock / #googletest to write C++ unit tests for code that uses dependency injection, how the *hell* do go about mocking dependencies of a class under test without having to mock the dependency class' dependencies, and *those* class' dependencies, and so on until you've mocked every class in the dependency tree of the class under test?

    "Interfaces" or "templates" are *not* valid answers, as they drive complexity into your non-test code purely to support testing!

  2. Okay, so when using #gtest / #gmock / #googletest to write C++ unit tests for code that uses dependency injection, how the *hell* do go about mocking dependencies of a class under test without having to mock the dependency class' dependencies, and *those* class' dependencies, and so on until you've mocked every class in the dependency tree of the class under test?

    "Interfaces" or "templates" are *not* valid answers, as they drive complexity into your non-test code purely to support testing!

  3. Okay, so when using #gtest / #gmock / #googletest to write C++ unit tests for code that uses dependency injection, how the *hell* do go about mocking dependencies of a class under test without having to mock the dependency class' dependencies, and *those* class' dependencies, and so on until you've mocked every class in the dependency tree of the class under test?

    "Interfaces" or "templates" are *not* valid answers, as they drive complexity into your non-test code purely to support testing!

  4. Okay, so when using #gtest / #gmock / #googletest to write C++ unit tests for code that uses dependency injection, how the *hell* do go about mocking dependencies of a class under test without having to mock the dependency class' dependencies, and *those* class' dependencies, and so on until you've mocked every class in the dependency tree of the class under test?

    "Interfaces" or "templates" are *not* valid answers, as they drive complexity into your non-test code purely to support testing!

  5. Okay, so when using #gtest / #gmock / #googletest to write C++ unit tests for code that uses dependency injection, how the *hell* do go about mocking dependencies of a class under test without having to mock the dependency class' dependencies, and *those* class' dependencies, and so on until you've mocked every class in the dependency tree of the class under test?

    "Interfaces" or "templates" are *not* valid answers, as they drive complexity into your non-test code purely to support testing!