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>();
        }
Esempio n. 2
0
 public void SetViewModel(IssueEditorViewModel viewModel)
 {
     DataContext = viewModel;
 }
Esempio n. 3
0
 public IssueEditor()
 {
     InitializeComponent();
     _gitHubViewModel = Factory.Get <IssueEditorViewModel>();
     DataContext      = _gitHubViewModel;
 }