Beispiel #1
0
        private static void AcceptTest(Config configuration, params Release[] releases)
        {
            var fakeClient = new FakeGitHubClient();

            foreach (var release in releases)
            {
                fakeClient.Releases.Add(release);
            }

            var builder = new ReleaseNotesExporter(fakeClient, configuration);
            var notes   = builder.ExportReleaseNotes(null).Result;

            Approvals.Verify(notes);
        }
        private static void AcceptTest(Config configuration, params Release[] releases)
        {
            var fakeClient = new FakeGitHubClient();

            foreach (var release in releases)
            {
                fakeClient.Releases.Add(release);
            }

            var builder = new ReleaseNotesExporter(fakeClient, configuration);
            var notes = builder.ExportReleaseNotes(null).Result;

            Approvals.Verify(notes);
        }
        private static void AcceptTest(int commits, Config config, params Issue[] issues)
        {
            var fakeClient       = new FakeGitHubClient();
            var fileSystem       = new FileSystem();
            var currentDirectory = Environment.CurrentDirectory;
            var configuration    = config ?? ConfigurationProvider.Provide(currentDirectory, fileSystem);

            fakeClient.Milestones.Add(CreateMilestone("1.2.3"));

            fakeClient.NumberOfCommits = commits;

            foreach (var issue in issues)
            {
                fakeClient.Issues.Add(issue);
            }

            var builder = new ReleaseNotesBuilder(fakeClient, "TestUser", "FakeRepository", "1.2.3", configuration);
            var notes   = builder.BuildReleaseNotes().Result;

            Approvals.Verify(notes);
        }
        private static void AcceptTest(int commits, params Issue[] issues)
        {
            var fakeClient = new FakeGitHubClient();
            var fileSystem = new FileSystem();
            var currentDirectory = Environment.CurrentDirectory;
            var configuration = ConfigurationProvider.Provide(currentDirectory, fileSystem);

            fakeClient.Milestones.Add(CreateMilestone("1.2.3"));

            fakeClient.NumberOfCommits = commits;

            foreach (var issue in issues)
            {
                fakeClient.Issues.Add(issue);
            }

            var builder = new ReleaseNotesBuilder(fakeClient, "TestUser", "FakeRepository", "1.2.3", configuration);
            var notes = builder.BuildReleaseNotes().Result;

            Approvals.Verify(notes);
        }