示例#1
0
        public void then_property_can_be_added()
        {
            AddRegistrationPropertyCommand addRegistrationPropertyCommand = registrationAddCommands.OfType <AddRegistrationPropertyCommand>().FirstOrDefault();

            Assert.IsNotNull(addRegistrationPropertyCommand);
            Assert.IsNotNull(addRegistrationPropertyCommand.DefaultAddCommand);

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

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

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