public void SetUp()
        {
            var issuesAssemblyCatalog = new AssemblyCatalog(typeof(Cache).Assembly);
            var mockServicesCatalog   = new TypeCatalog(typeof(Model.CacheTest.MockServiceProvider));
            var catalog        = new AggregateCatalog(issuesAssemblyCatalog, mockServicesCatalog);
            var exportProvider = new CompositionContainer(catalog);

            Factory.Rebind <ICache>().ToConstant(exportProvider.GetExportedValue <Cache>());
            Factory.Rebind <GitHubApiBase>().To <GitHubApiMock>().InScope(o => this);
            _viewModel = Factory.Get <IssueEditorViewModel>();
        }
Beispiel #2
0
 public void SetViewModel(IssueEditorViewModel viewModel)
 {
     DataContext = viewModel;
 }
Beispiel #3
0
 public IssueEditor()
 {
     InitializeComponent();
     _gitHubViewModel = Factory.Get <IssueEditorViewModel>();
     DataContext      = _gitHubViewModel;
 }