Exemplo n.º 1
0
 public void BeforeEach()
 {
     model      = Substitute.For <IPostprocessorTags>();
     view       = Substitute.For <IView>();
     dialogView = Substitute.For <IDialogView>();
     alerts     = Substitute.For <IAlertPopup>();
     view.When(v => v.SetViewModel(Arg.Any <IViewModel>())).Do(x => viewModel = x.Arg <IViewModel>());
     view.CreateDialog(Arg.Do <IDialogViewModel>(x => dialogViewModel         = x), Arg.Any <IEnumerable <string> >(), Arg.Any <string>()).Returns(dialogView);
     changeNotification = Substitute.For <IChangeNotification>();
     model.AvailableTags.Returns(ImmutableHashSet.Create(new[] { "foo", "bar", "item-1", "item-2", "abd", "abc" }));
     model.TagsPredicate.Returns(TagsPredicate.Parse("bar OR item-1 AND NOT abc"));
     presenter = new TagsListPresenter(
         model,
         view,
         changeNotification,
         alerts
         );
 }
Exemplo n.º 2
0
 TL.IPresenter IPresentationObjectsFactory.CreateTagsList(IPostprocessorTags model, TL.IView view, IChangeNotification changeNotification)
 {
     return(new TL.TagsListPresenter(model, view, changeNotification, alerts));
 }