public void then_method_can_be_added() { AddRegistrationMethodCommand addRegistrationMethodCommand = registrationAddCommands.OfType <AddRegistrationMethodCommand>().FirstOrDefault(); Assert.IsNotNull(addRegistrationMethodCommand); Assert.IsNotNull(addRegistrationMethodCommand.DefaultAddCommand); Assert.IsTrue(addRegistrationMethodCommand.DefaultAddCommand.CanExecute(null)); }
protected override void Arrange() { base.Arrange(); RegistrationElement.Property("TypeName").Value = typeof(RegistrationType).AssemblyQualifiedName; AddRegistrationMethodCommand = RegistrationElement.AddCommands .SelectMany(x => x.ChildCommands) .OfType <AddRegistrationMethodCommand>() .FirstOrDefault(); }