using ZB.MOM.WW.ScadaBridge.Commons.Messages.Management;
namespace ZB.MOM.WW.ScadaBridge.Commons.Tests.Messages;
///
/// Verifies that is discovered by
/// so it travels over the management
/// boundary as a known command (resolvable by wire name and round-trippable
/// through GetCommandName / Resolve).
///
public class BrowseCommandsRegistryTests
{
/// Verifies that the command registry discovers the browse-node command.
[Fact]
public void Registry_discovers_BrowseNodeCommand()
{
// GetCommandName throws ArgumentException for any type the registry
// does not contain, so a successful call here is proof of discovery.
var name = ManagementCommandRegistry.GetCommandName(typeof(BrowseNodeCommand));
Assert.Equal("BrowseNode", name);
Assert.Equal(typeof(BrowseNodeCommand), ManagementCommandRegistry.Resolve(name));
}
}