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