profesorfalken / jProcesses

Get crossplatform processes details with Java
Apache License 2.0
63 stars 26 forks source link

Added tests that fail for WindowsProcessesService #11

Closed dmgburg closed 8 years ago

dmgburg commented 8 years ago

Tests use Mockito framework to get reprodusable test scenarious.

profesorfalken commented 8 years ago

Hi!

Thank you again for your contribution!

I have some problems here. -I try to use the 'master' branch just for delivered versions. To make the develops I always use a branch in snapshot called 'develop'. Could you make there the pull request? -I have to keep the project in 1.5 compilation because the two main projects I know that use JProcesses must work with this version of Java. That's why also JPowerShell and WMI4Java are in 1.5 :-(. Is it necessary for your modifications to be on java 1.6? -I do not understand very well the method getWmi4java. For what I see the variable is always null so we return always a new instance. Moreover, wouldn't be better also to return an instance 'already VBS' (.get().VBSEngine()) as it is the implementation always used?

When I have used mockito I have done it to mock resources that were not available or too slow in test environment (bbdd, remote connections, etc) but the processes are always available in any computer. What is the point of create a simulation data and check it against the same simulation data? Shouldn't it always work? The target is only to test the parsing of data by the service?

Thank you!

dmgburg commented 8 years ago

Hello again.