@@ -31,6 +31,7 @@ public class VcsServiceTests
31
31
private const string TAG_NAME = "0.1.0" ;
32
32
private const string RELEASE_NOTES = "Release Notes" ;
33
33
private const string ASSET_CONTENT = "Asset Content" ;
34
+ private const bool SKIP_PRERELEASES = false ;
34
35
35
36
private const string UNABLE_TO_FOUND_MILESTONE_MESSAGE = "Unable to find a {State} milestone with title '{Title}' on '{Owner}/{Repository}'" ;
36
37
private const string UNABLE_TO_FOUND_RELEASE_MESSAGE = "Unable to find a release with tag '{TagName}' on '{Owner}/{Repository}'" ;
@@ -591,17 +592,17 @@ public async Task Should_Get_Release_Notes()
591
592
var releases = Enumerable . Empty < Release > ( ) ;
592
593
var releaseNotes = "Release Notes" ;
593
594
594
- _vcsProvider . GetReleasesAsync ( OWNER , REPOSITORY )
595
+ _vcsProvider . GetReleasesAsync ( OWNER , REPOSITORY , SKIP_PRERELEASES )
595
596
. Returns ( Task . FromResult ( releases ) ) ;
596
597
597
598
_releaseNotesExporter . ExportReleaseNotes ( Arg . Any < IEnumerable < Release > > ( ) )
598
599
. Returns ( releaseNotes ) ;
599
600
600
- var result = await _vcsService . ExportReleasesAsync ( OWNER , REPOSITORY , null ) . ConfigureAwait ( false ) ;
601
+ var result = await _vcsService . ExportReleasesAsync ( OWNER , REPOSITORY , null , SKIP_PRERELEASES ) . ConfigureAwait ( false ) ;
601
602
result . ShouldBeSameAs ( releaseNotes ) ;
602
603
603
604
await _vcsProvider . DidNotReceive ( ) . GetReleaseAsync ( Arg . Any < string > ( ) , Arg . Any < string > ( ) , Arg . Any < string > ( ) ) . ConfigureAwait ( false ) ;
604
- await _vcsProvider . Received ( 1 ) . GetReleasesAsync ( OWNER , REPOSITORY ) . ConfigureAwait ( false ) ;
605
+ await _vcsProvider . Received ( 1 ) . GetReleasesAsync ( OWNER , REPOSITORY , SKIP_PRERELEASES ) . ConfigureAwait ( false ) ;
605
606
_logger . Received ( 1 ) . Verbose ( Arg . Any < string > ( ) , OWNER , REPOSITORY ) ;
606
607
_releaseNotesExporter . Received ( 1 ) . ExportReleaseNotes ( Arg . Any < IEnumerable < Release > > ( ) ) ;
607
608
}
@@ -617,11 +618,11 @@ public async Task Should_Get_Release_Notes_For_Tag()
617
618
_releaseNotesExporter . ExportReleaseNotes ( Arg . Any < IEnumerable < Release > > ( ) )
618
619
. Returns ( RELEASE_NOTES ) ;
619
620
620
- var result = await _vcsService . ExportReleasesAsync ( OWNER , REPOSITORY , TAG_NAME ) . ConfigureAwait ( false ) ;
621
+ var result = await _vcsService . ExportReleasesAsync ( OWNER , REPOSITORY , TAG_NAME , SKIP_PRERELEASES ) . ConfigureAwait ( false ) ;
621
622
result . ShouldBeSameAs ( RELEASE_NOTES ) ;
622
623
623
624
await _vcsProvider . Received ( 1 ) . GetReleaseAsync ( OWNER , REPOSITORY , TAG_NAME ) . ConfigureAwait ( false ) ;
624
- await _vcsProvider . DidNotReceive ( ) . GetReleasesAsync ( Arg . Any < string > ( ) , Arg . Any < string > ( ) ) . ConfigureAwait ( false ) ;
625
+ await _vcsProvider . DidNotReceive ( ) . GetReleasesAsync ( Arg . Any < string > ( ) , Arg . Any < string > ( ) , Arg . Any < bool > ( ) ) . ConfigureAwait ( false ) ;
625
626
_logger . Received ( 1 ) . Verbose ( Arg . Any < string > ( ) , OWNER , REPOSITORY , TAG_NAME ) ;
626
627
_releaseNotesExporter . Received ( 1 ) . ExportReleaseNotes ( Arg . Any < IEnumerable < Release > > ( ) ) ;
627
628
}
@@ -635,7 +636,7 @@ public async Task Should_Get_Default_Release_Notes_For_Non_Existent_Tag()
635
636
_releaseNotesExporter . ExportReleaseNotes ( Arg . Any < IEnumerable < Release > > ( ) )
636
637
. Returns ( RELEASE_NOTES ) ;
637
638
638
- var result = await _vcsService . ExportReleasesAsync ( OWNER , REPOSITORY , TAG_NAME ) . ConfigureAwait ( false ) ;
639
+ var result = await _vcsService . ExportReleasesAsync ( OWNER , REPOSITORY , TAG_NAME , SKIP_PRERELEASES ) . ConfigureAwait ( false ) ;
639
640
result . ShouldBeSameAs ( RELEASE_NOTES ) ;
640
641
641
642
await _vcsProvider . Received ( 1 ) . GetReleaseAsync ( OWNER , REPOSITORY , TAG_NAME ) . ConfigureAwait ( false ) ;
0 commit comments