We could add the functions (e.g. Test-OpticalDiskCanBeManaged) that is part of the resource as public commands so it possible to use them standalone. But that can be a future PR.
I started using that pattern in SqlServerDsc and will do that in future PRs in other modules as well. See private and public functions in SqlServerDsc, and I also recently fixed so they are auto-documented in the wiki (using DscResource.DocGenerator), see the "tree" (that is also automatically built) to the right in the SqlServerDsc wiki.
Using this pattern it so much simpler testing the code practically as I can use the commands to verify the functionality without the need to run LCM or Invoke-DscResource, then adding them to a DSC resource is just another layer.
We could add the functions (e.g. Test-OpticalDiskCanBeManaged) that is part of the resource as public commands so it possible to use them standalone. But that can be a future PR.
I started using that pattern in SqlServerDsc and will do that in future PRs in other modules as well. See private and public functions in SqlServerDsc, and I also recently fixed so they are auto-documented in the wiki (using DscResource.DocGenerator), see the "tree" (that is also automatically built) to the right in the SqlServerDsc wiki. Using this pattern it so much simpler testing the code practically as I can use the commands to verify the functionality without the need to run LCM or Invoke-DscResource, then adding them to a DSC resource is just another layer.