public void Remove() { var factory = new CommandFactory(); var name = new CommandId("name"); Func <ICommand> activator = () => new Mock <ICommand>().Object; factory.Add(name, activator); factory.Remove(name); Assert.IsFalse(factory.Contains(name)); }
public void Remove() { var factory = new CommandFactory(); var name = new CommandId("name"); Func<ICommand> activator = () => new Mock<ICommand>().Object; factory.Add(name, activator); factory.Remove(name); Assert.IsFalse(factory.Contains(name)); }
public void RemoveWithUnknownName() { var factory = new CommandFactory(); Assert.Throws <UnknownCommandException>(() => factory.Remove(new CommandId("name"))); }
public void RemoveWithUnknownName() { var factory = new CommandFactory(); Assert.Throws<UnknownCommandException>(() => factory.Remove(new CommandId("name"))); }