Example #1
0
        public async Task Create_Branch_Normal_Case()
        {
            var fixture = new GitHubFixture();

            var ExpectedTargetBranchName = $"{fixture.InputSourceBranch}-{fixture.InputLanguage}";
            var ExpectedSha = "quux";

            fixture.SetUpCreateBranchAsync(fixture.InputOwner, fixture.InputRepo, fixture.InputSourceBranch, ExpectedTargetBranchName, ExpectedSha);
            var service = new GitHubService(fixture.GitHubRepository);
            var result  = await service.CreateBranchAsync(fixture.InputOwner, fixture.InputRepo, fixture.InputSourceBranch, fixture.InputLanguage);

            fixture.VerifyCreateBranchAsync();
            Assert.Equal(ExpectedSha, result.commit.sha);
        }