Exemplo n.º 1
0
        public void then_constructor_can_be_added()
        {
            AddRegistrationConstructorCommand addConstrcutorCommand = registrationAddCommands.OfType <AddRegistrationConstructorCommand>().FirstOrDefault();

            Assert.IsNotNull(addConstrcutorCommand);
            Assert.IsNotNull(addConstrcutorCommand.DefaultAddCommand);

            Assert.IsTrue(addConstrcutorCommand.DefaultAddCommand.CanExecute(null));
        }
        protected override void Arrange()
        {
            base.Arrange();

            RegistrationElement.Property("TypeName").Value = typeof(RegistrationType).AssemblyQualifiedName;

            AddConstructorCommand = RegistrationElement.AddCommands
                                    .SelectMany(x => x.ChildCommands)
                                    .OfType <AddRegistrationConstructorCommand>()
                                    .FirstOrDefault();
        }