public void PackageCommandManager_RegisterCommand() { // Arrange int cmdId = 42; Guid cmdSetGuid = new Guid(CommonGuids.CommandSet); CommandID commandIdObject = new CommandID(cmdSetGuid, cmdId); var command = new ConfigurableVsCommand(); var testSubject = new PackageCommandManager(this.menuService); // Act testSubject.RegisterCommand(cmdId, command); // Assert var registeredCommand = menuService.Commands.Single().Value; registeredCommand.CommandID.Should().Be(commandIdObject, $"Unexpected CommandID"); }
public void PackageCommandManager_RegisterCommand() { // Setup int cmdId = 42; Guid cmdSetGuid = new Guid(CommonGuids.CommandSet); CommandID commandIdObject = new CommandID(cmdSetGuid, cmdId); var command = new ConfigurableVsCommand(serviceProvider); var testSubject = new PackageCommandManager(serviceProvider); // Act testSubject.RegisterCommand(cmdId, command); // Verify var registeredCommand = menuService.Commands.Single().Value; Assert.AreEqual(commandIdObject, registeredCommand.CommandID, $"Unexpected CommandID"); }