You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "stephen mallette (JIRA)" <ji...@apache.org> on 2017/08/23 11:16:00 UTC

[jira] [Updated] (TINKERPOP-1756) I wish Cluster was an interface so that I could mock it

     [ https://issues.apache.org/jira/browse/TINKERPOP-1756?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

stephen mallette updated TINKERPOP-1756:
----------------------------------------
    Issue Type: Improvement  (was: Wish)

hmmm - i would have thought that most people would mock {{Client}} if they had to. {{Cluster}} seems less typical. can you talk about what you're trying to test with {{Cluster}} that requires you to mock?

Note that you can mock final class/methods with mockito and powermock so this issue shouldn't really hold you up.

> I wish Cluster was an interface so that I could mock it
> -------------------------------------------------------
>
>                 Key: TINKERPOP-1756
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1756
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: driver
>    Affects Versions: 3.2.4
>            Reporter: Anish Doshi
>
> {{org.apache.tinkerpop.gremlin.driver.Cluster}} is currently a final class. Which means that every time I need to mock this class, I cannot. I have to create a separate object and mock that object instead of mocking {{Cluster}}.
> Is there a chance that Cluster can be changed to an interface, or at least not have as a {{final}} class?
> Thanks.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)