You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by "BenjaminPerryRoss (GitHub)" <gi...@apache.org> on 2019/09/19 21:20:23 UTC

[GitHub] [geode] BenjaminPerryRoss commented on pull request #4061: Geode 6874: add unit tests to tomcat modules

In other tests this was possible and I've replaced internal uses there with the public interfaces. For this test specifically, the 3 internal references are necessary. The product itself performs a cast of the retrieved Cache object to GemFireCacheImpl, and as a result passing a mock of Cache.class throws an exception since a mock of Cache.class can't be cast to an instance of GemFireCacheImpl. This also ties us to the use of InternalQueryService as the getQueryService() implementation of GemFireCacheImpl returns an InternalQueryService specifically, so in order to mock that call we have to use the internal object. The SelectResults on the other hand aren't being used for mocking, we're actually creating a real object to return. It seemed appropriate to use an actual implementation of the interface for this rather than creating one specifically for this test.

[ Full content available at: https://github.com/apache/geode/pull/4061 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org