示例#1
0
        public EpisodeTrackerTests()
        {
            FakeHttpMessageHandler fakeHandler = new FakeHttpMessageHandler();

            FakeHandlerSeeder.Seed(fakeHandler);

            this.Tracker = new Tracker(
                new HttpClient(fakeHandler),
                new InMemoryStorage()
                );
        }
示例#2
0
        public void StartingWithoutConfigShouldReturnConfigurationException()
        {
            FakeHttpMessageHandler fakeHandler = new FakeHttpMessageHandler();

            FakeHandlerSeeder.Seed(fakeHandler);

            Assert.Throws <Exceptions.ApiCredentialException>(() =>
                                                              new Tracker(
                                                                  new HttpClient(fakeHandler),
                                                                  new JsonStorage(
                                                                      Path.Combine(
                                                                          Path.Combine(
                                                                              Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),
                                                                              "Data"),
                                                                          "EpisodeTracker.json"
                                                                          )
                                                                      )
                                                                  )
                                                              );
        }