Skip to content

Commit ab38df8

Browse files
author
Frode Sjovatsen
committed
added varargs to Link.with
1 parent 4c2fefd commit ab38df8

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

FINT.Model.Resource.Test/LinkTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ public class LinkTest
77
[Fact]
88
public void Create_Link_with_PersonResource_placeholder()
99
{
10-
var link = Link.with(typeof(PersonResource), new string[] { "id" });
10+
var link = Link.with(typeof(PersonResource), "/id");
1111

1212
Assert.Equal(link.href, "${test.person}/id");
1313
}
1414

1515
[Fact]
1616
public void Create_Link_with_Person_placeholder()
1717
{
18-
var link = Link.with(typeof(Person), new string[] { "id" });
18+
var link = Link.with(typeof(Person), "/id");
1919

2020
Assert.Equal(link.href, "${test.person}/id");
2121
}

FINT.Model.Resource/FINT.Model.Resource.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<TargetFramework>netstandard1.4</TargetFramework>
4-
<Version>0.0.1</Version>
4+
<Version>1.0.0-RC.1</Version>
55
<Authors>FINT</Authors>
66
<PackageTags>fint</PackageTags>
77
</PropertyGroup>

FINT.Model.Resource/Link.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public static Link with(string verdi)
2121
return new Link(verdi);
2222
}
2323

24-
public static Link with(Type placeholderClass, string[] pathElements)
24+
public static Link with(Type placeholderClass, params string[] pathElements)
2525
{
2626
return with(placeholderClass, string.Join("/", pathElements));
2727
}

0 commit comments

Comments
 (0)