public void Return_A_Null_sha_When_Ref_Result_Is_Not_Found() { Inquisitor.Arrange(i => i.GetRefForRepo(Arg.AnyString, Arg.AnyString)).Returns(NotfoundRefResult); var firstRepo = Target.GetReposForUser("erikdietrich").First(); Assert.IsNull(firstRepo.Sha); }
public void Return_No_Repositories_For_NotFound_UserId() { Inquisitor.Arrange(i => i.GetRepoSearchResults(Arg.AnyString)).Returns(NotFoundResult); var repos = Target.GetReposForUser("doesntmatter"); Assert.IsFalse(repos.Any()); }
public void Should_Return_Empty_FilesList_When_Tree_Result_Is_Not_Found() { Inquisitor.Arrange(i => i.GetRecursiveTree(Arg.AnyString, Arg.AnyString, Arg.AnyString)).Returns(NotFoundTreeResult); var firstRepo = Target.GetReposForUser("erikdietrich").First(); Assert.AreEqual <int>(0, firstRepo.Files.Count()); }
public void BeforeEachTest() { Inquisitor = Mock.Create <IGithubInquisitor>(); Inquisitor.Arrange(i => i.GetRepoSearchResults(Arg.AnyString)).Returns(SingleResult); Inquisitor.Arrange(i => i.GetRefForRepo(Arg.AnyString, Arg.AnyString)).Returns(RefResult); Inquisitor.Arrange(i => i.GetRecursiveTree(Arg.AnyString, Arg.AnyString, Arg.AnyString)).Returns(ChessTddRecursiveTreeResult); Target = new ProfileSearcher(Inquisitor); }