public void TagPassesToRepo( [Frozen] IGitRepository repo, string target, GetRepoTarget sut) { sut.Get(repo, new GitPatcherVersioning(PatcherVersioningEnum.Tag, target)); repo.Received(1).TryGetTagSha(target, out Arg.Any <string?>()); }
public void TagTargetFetches( [Frozen] IGitRepository repo, string target, GetRepoTarget sut) { sut.Get(repo, new GitPatcherVersioning(PatcherVersioningEnum.Tag, target)); repo.Received(1).Fetch(); }
public void PassesShaToTryGetCommit( [Frozen] IGitRepository repo, RepoTarget targets, GitPatcherVersioning patcherVersioning, CancellationToken cancel, RetrieveCommit sut) { sut.TryGet(repo, targets, patcherVersioning, cancel); repo.Received(1).TryGetCommit(targets.TargetSha, out Arg.Any <bool>()); }
public void ChecksOutMainBranch( IGitRepository repo, ResetToLatestMain sut) { var branch = Substitute.For <IBranch>(); repo.MainBranch.Returns(branch); sut.TryReset(repo); repo.Received(1).Checkout(branch); }