public void Keywords()
        {
            _ChangedProperties = new List<String>();

            var viewModel = new QuickSearchViewModel();
            viewModel.PropertyChanged += HandlePropertyChanged;
            var keywords = Guid.NewGuid().ToString();

            viewModel.Keywords = keywords;

            Assert.AreEqual(keywords, viewModel.Keywords);
            Assert.IsTrue(_ChangedProperties.Contains("Keywords"));
        }
        public void Advanced()
        {
            var container = new WindsorContainer();
            ComponentContainer.Container = container;

            ShowViewMessage showViewMessage = null;
            var messageBus = Substitute.For<IMessageBus>();
            messageBus
                .When(bus => bus.Publish<ShowViewMessage>(Arg.Any<ShowViewMessage>()))
                .Do(arg => showViewMessage = arg[0] as ShowViewMessage);

            container.Register(
                Castle.MicroKernel.Registration.Component.For<IMessageBus>().Instance(messageBus));

            var viewModel = new QuickSearchViewModel();

            viewModel.Advanced();

            Assert.AreEqual(MoviesViewTargets.AdvancedSearch, showViewMessage.ViewTarget);
        }
        public void Search()
        {
            var container = new WindsorContainer();
            ComponentContainer.Container = container;

            SearchMessage searchMessage = null;
            var messageBus = Substitute.For<IMessageBus>();
            messageBus
                .When(bus => bus.Publish<SearchMessage>(Arg.Any<SearchMessage>()))
                .Do(arg => searchMessage = arg[0] as SearchMessage);
            container.Register(
                Castle.MicroKernel.Registration.Component.For<IMessageBus>().Instance(messageBus));

            var viewModel = new QuickSearchViewModel();

            var keywords = Guid.NewGuid().ToString();
            viewModel.Keywords = keywords;

            viewModel.SearchCommand.Execute(null);

            Assert.IsNotNull(searchMessage);
            Assert.AreEqual(keywords, searchMessage.Keywords);
        }