public void SetUp()
 {
     var mockCache = new Mock<ICache>();
     _mockApi = new Mock<GitHubApiBase>(mockCache.Object);
     Factory.Rebind<GitHubApiBase>().ToConstant(_mockApi.Object);
     _viewModel = Factory.Get<IssueListViewModel>();
 }
        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);
            Factory.Rebind<IIssueEditor>().To<IssueEditorMock>();
            _viewModel = Factory.Get<IssueListViewModel>();
        }
 public IssueList()
 {
     InitializeComponent();
     _viewModel = Factory.Get<IssueListViewModel>();
     DataContext = _viewModel;
 }