예제 #1
0
        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));
        }
예제 #2
0
        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));
        }
예제 #3
0
        public void RemoveWithUnknownName()
        {
            var factory = new CommandFactory();

            Assert.Throws <UnknownCommandException>(() => factory.Remove(new CommandId("name")));
        }
예제 #4
0
 public void RemoveWithUnknownName()
 {
     var factory = new CommandFactory();
     Assert.Throws<UnknownCommandException>(() => factory.Remove(new CommandId("name")));
 }