Skip to content

Commit

Permalink
Add missing Changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
bartelink committed Nov 9, 2020
1 parent 2cc95e1 commit a0a9776
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 13 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ The `Unreleased` section name is replaced by the expected version of next releas
### Removed
### Fixed

- Clarify `StreamName.parse` exception message [#58](https://github.com/jet/FsCodec/pull/58) :pray: [@dharmaturtle](https://github.com/dharmaturtle)

<a name="2.1.1"></a>
## [2.1.1] - 2020-05-25

Expand Down
2 changes: 1 addition & 1 deletion src/FsCodec/StreamName.fs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ module StreamName =
/// Throws <code>InvalidArgumentException</code> if it does not adhere to that form
let parse (rawStreamName : string) : StreamName =
if rawStreamName.IndexOf('-') = -1 then
invalidArg (sprintf "Stream Name '%s' must contain a '-' separator" rawStreamName) "streamName"
invalidArg "streamName" (sprintf "Stream Name '%s' must contain a '-' separator" rawStreamName)
UMX.tag rawStreamName

(* Parsing: Raw Stream name Validation functions/pattern that handle malformed cases without throwing *)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="FsCheck.Xunit" Version="2.14.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
<PackageReference Include="FsCheck.Xunit" Version="2.14.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Include="Serilog" Version="2.9.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="3.0.0" />
<PackageReference Include="Unquote" Version="5.0.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />

<PackageReference Include="FsCheck.Xunit" Version="2.14.1" />
<PackageReference Include="FsCheck.Xunit" Version="2.14.3" />
<PackageReference Include="Serilog.Sinks.Console" Version="3.0.0" />
<PackageReference Include="Unquote" Version="5.0.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions tests/FsCodec.Tests/FsCodec.Tests.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Include="Unquote" Version="5.0.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />
</ItemGroup>

<ItemGroup>
Expand Down
9 changes: 5 additions & 4 deletions tests/FsCodec.Tests/StreamNameTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ let [<Fact>] ``Can roundtrip single aggregateIds with embedded dashes and unders
test <@ let (StreamName.CategoryAndIds (scat, aggIds)) = sn
scat = cat && ["a-b";"c-d"] = List.ofArray aggIds @>

let [<Fact>] ``StreamName.parse throws given 0 separators`` () =
raisesWith<System.ArgumentException>
<@ StreamName.parse "Cat" @>
(fun e -> <@ e.Message = "streamName (Parameter 'Stream Name 'Cat' must contain a '-' separator')" @>)
let [<Fact>] ``StreamName parse throws given 0 separators`` () =
raisesWith <@ StreamName.parse "Cat" @>
(fun (e : System.ArgumentException) -> <@
e.ParamName = "streamName"
&& e.Message.StartsWith "Stream Name 'Cat' must contain a '-' separator" @>)

0 comments on commit a0a9776

Please sign in to comment.