public IssueController(IIssueStore store, 
     IStateFactory<Issue, IssueState> stateFactory, 
     IssueLinkFactory linkFactory)
 {
     _store = store;
     _stateFactory = stateFactory;
     _linkFactory = linkFactory;
 }
Example #2
0
        public IssuesFeature()
        {
            MockIssueStore = new Mock <IIssueStore>();
            Request        = new HttpRequestMessage();
            IssueLinks     = new IssueLinkFactory(Request);
            StateFactory   = new IssueStateFactory(IssueLinks);
            FakeIssues     = GetFakeIssues();
            var server = new HttpServer(GetConfiguration());

            Client = new HttpClient(server);
        }
Example #3
0
        public IssuesFeature()
        {
            MockIssueStore = new Mock <IIssueStore>();
            Request        = new HttpRequestMessage();
            Request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/vnd.issue+json"));
            IssueLinks   = new IssueLinkFactory(Request);
            StateFactory = new IssueStateFactory(IssueLinks);
            FakeIssues   = GetFakeIssues();
            var config = new HttpConfiguration();

            WebApiBook.IssueTrackerApi.WebApiConfiguration.Configure(config, MockIssueStore.Object);
            var server = new HttpServer(config);

            Client = new HttpClient(server);
        }
Example #4
0
 public IssueFeature()
 {
     MockIssueStore = new Mock<IIssueStore>();
     Request = new HttpRequestMessage();
     Request.Headers.Accept.Add(
         new MediaTypeWithQualityHeaderValue(
             "application/vnd.issue+json"));
     IssueLinks = new IssueLinkFactory(Request);
     StateFactory = new IssueStateFactory(IssueLinks);
     FakeIssues = GetFakeIssues();
     var config = new HttpConfiguration();
     IssueTrackerApi.WebApiConfiguration.Configure(
         config, MockIssueStore.Object);
     var server = new HttpServer(config);
     Client = new HttpClient(server);
 }
Example #5
0
 public IssueController(IIssueStore store, IStateFactory <Issue, IssueState> stateFactory, IssueLinkFactory linkFactory)
 {
     _store        = store;
     _stateFactory = stateFactory;
     _linkFactory  = linkFactory;
 }
 public HomeController(IssueLinkFactory linkFactory)
 {
     _linkFactory = linkFactory;
 }