Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Amend ServiceController dependency tests #1013

Merged
merged 1 commit into from
Feb 25, 2015

Conversation

nslottow
Copy link
Contributor

Modifies the System.ServiceProcess.ServiceController dependency tests
to verify the exact number of expected dependent/dependency services
for each test service as well as the expected names for each dependent/
dependency.

Also covers cases in which ServiceController.ServicesDependedOn has
a length > 1.

Fixes #653

Modifies the System.ServiceProcess.ServiceController dependency tests
to verify the exact number of expected dependent/dependency services
for each test service as well as the expected names for each dependent/
dependency.

Also covers cases in which ServiceController.ServicesDependedOn has
a length > 1.

Fixes #653
@nslottow
Copy link
Contributor Author

@weshaggard, FYI commenting out the <RunTestsForProject>False</RunTestsForProject> and setting OS='Windows_NT' in the test project, it still doesn't look like the NativeTestService.exe gets published to the bin\test\* directory as it should as a result of your change 80cb8f5. I haven't quite figured out why yet, but if you're aware of something that might have changed to cause this, please let me know.

{
_testService.DeleteTestServices();
foreach (ServiceController service in services)
Copy link
Member

Choose a reason for hiding this comment

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

Code like this could be simplified with LINQ.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here I avoided taking the dependency on an additional NuGet package just for the sake of using IEnumerable.Where() once. If there were more code where LINQ applied, I would take the dependency.

@stephentoub
Copy link
Member

LGTM.

nslottow added a commit that referenced this pull request Feb 25, 2015
Amend ServiceController dependency tests
@nslottow nslottow merged commit 3a8dddb into dotnet:master Feb 25, 2015
@nslottow nslottow deleted the service-controller-test branch February 25, 2015 18:06
@karelz karelz modified the milestone: 1.0.0-rtm Dec 3, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
5 participants