dsccommunity / ComputerManagementDsc

DSC resources for for configuration of a Windows computer. These DSC resources allow you to perform computer management tasks, such as renaming the computer, joining a domain and scheduling tasks as well as configuring items such as virtual memory, event logs, time zones and power settings.
https://dsccommunity.org
MIT License
300 stars 83 forks source link

ScheduledTask: Add Test to cover 'StopExisting' value in MultipleInstances Parameter #339

Open PlagueHO opened 4 years ago

PlagueHO commented 4 years ago

The StopExisting value in the MultipleInstances parameter must be handled in a special way because it is missing from the ENUM used by the underlying cmdlets/objects.

We don't have unit tests that specifically cover the use of this, so either extract the handling into a function that can be mocked and/or add an integration test.

See https://github.com/dsccommunity/ComputerManagementDsc/pull/335