예제 #1
0
        public void CannotCreateAReleaseOlderThanLatest()
        {
            const string changeLog = @"# Changelog
All notable changes to this project will be documented in this file.

<!--
Please ADD ALL Changes to the UNRELEASED SECTION and not a specific release
-->

## [Unreleased]
### Added
### Fixed
### Changed
- Something.
### Removed
### Deployment Changes

<!--
Releases that have at least been deployed to staging, BUT NOT necessarily released to live.  Changes should be moved from [Unreleased] into here as they are merged into the appropriate release branch
-->
## [2.0.0] - 2020-11-23
## Added
- An Item

## [0.0.0] - Project created";

            Assert.Throws <ReleaseTooOldException>(() => ChangeLogUpdater.CreateRelease(changeLog: changeLog, version: "1.0.0", pending: true));
        }
예제 #2
0
        public void ChangeLogWithOnlyRemovedInUnreleasedProducesReleaseWithJustAdded()
        {
            const string changeLog = @"# Changelog
All notable changes to this project will be documented in this file.

<!--
Please ADD ALL Changes to the UNRELEASED SECTION and not a specific release
-->

## [Unreleased]
### Added
### Fixed
### Changed
### Removed
- Some Content
### Deployment Changes

<!--
Releases that have at least been deployed to staging, BUT NOT necessarily released to live.  Changes should be moved from [Unreleased] into here as they are merged into the appropriate release branch
-->
## [0.0.0] - Project created";

            string updated = ChangeLogUpdater.CreateRelease(changeLog: changeLog, version: "1.0.0", pending: true);

            const string expected = @"# Changelog
All notable changes to this project will be documented in this file.

<!--
Please ADD ALL Changes to the UNRELEASED SECTION and not a specific release
-->

## [Unreleased]
### Added
### Fixed
### Changed
### Removed
### Deployment Changes

<!--
Releases that have at least been deployed to staging, BUT NOT necessarily released to live.  Changes should be moved from [Unreleased] into here as they are merged into the appropriate release branch
-->
## [1.0.0] - TBD
### Removed
- Some Content

## [0.0.0] - Project created";

            this._output.WriteLine(updated);
            Assert.Equal(expected: expected, actual: updated);
        }