public ApiCallerTests() { var reader = new FakeConfigReader(); reader.SetDefaultFakeConfig(); source1 = reader.FakeConfig.Sources.First(); source2 = new ConfigSource(); source2.Title = "title2"; source2.Hoster = "fake"; reader.FakeConfig.Sources.Add(source2); this.context = new FakeContext(); this.context.Config = reader.ReadConfig(); list1 = new List <HosterRepository>(); list1.Add(new HosterRepository("foo1", "foo1", "http://foo1", ScmType.Git)); list2 = new List <HosterRepository>(); list2.Add(new HosterRepository("foo2", "foo2", "http://foo2", ScmType.Git)); hac = new FakeHosterApiCaller(); hac.Lists.Add(source1, list1); hac.Lists.Add(source2, list2); }
public IgnoringHosterApiCallerTests() { this.source = new ConfigSource { Title = "foo" }; var repos = new List <HosterRepository>(); repos.Add(new HosterRepository("foo.bar", "bar", "http://clone", ScmType.Git)); repos.Add(new HosterRepository("foo.baz", "baz", "http://clone", ScmType.Git)); var caller = new FakeHosterApiCaller(); caller.Lists.Add(this.source, repos); this.sut = new IgnoringHosterApiCaller(caller); }