Skip to content

Commit 97f5ce4

Browse files
committed
fixed Link (de)serialization from/to JSON
1 parent c4d8a50 commit 97f5ce4

3 files changed

Lines changed: 10 additions & 3 deletions

File tree

CenterDevice.Rest/CenterDevice.Rest.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<TargetFrameworks>netstandard2.0;netcoreapp3.1;net5.0;net48</TargetFrameworks>
55
<AssemblyName>CompuMaster.CenterDevice.Rest</AssemblyName>
6-
<Version>2022.4.20.101</Version>
6+
<Version>2022.4.20.102</Version>
77
<PackageLicenseExpression>MIT</PackageLicenseExpression>
88
<PackageProjectUrl>https://github.com/CompuMasterGmbH/CompuMaster.CenterDevice.IO</PackageProjectUrl>
99
<Copyright>Copyright © 2017-2021 CenterDevice GmbH, Bonn/Germany and CompuMaster GmbH, Emmelshausen/Germany</Copyright>

CenterDevice.Rest/Rest/Clients/Link/Link.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public class Link
2020
[JsonPropertyName(RestApiConstants.ACCESS_CONTROL)]
2121
public LinkAccessControl AccessControl { get; set; }
2222

23-
[JsonPropertyName(RestApiConstants.ACCESS_CONTROL)]
23+
[JsonPropertyName(RestApiConstants.COLLECTION)]
2424
public string Collection { get; set; }
2525

2626
[JsonPropertyName(RestApiConstants.VIEWS)]

Scopevisio.Teamwork.Test/DirectoriesExtendedTest.vb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,12 +421,19 @@ Imports CenterDevice.Test.Tools
421421
Me.IOClient.ApiClient.Link.UpdateLink(
422422
Me.IOClient.CurrentAuthenticationContextUserID, CreatedLink.Id, New CenterDevice.Rest.Clients.Link.LinkAccessControl() With {.ViewOnly = True, .Password = Guid.NewGuid.ToString("n")})
423423

424+
'Test for success
425+
Dim LinkDetails As CenterDevice.Rest.Clients.Link.Link = Me.IOClient.ApiClient.Link.GetLink(Me.IOClient.CurrentAuthenticationContextUserID, CreatedLink.Id)
426+
Assert.NotNull(LinkDetails)
427+
Assert.AreEqual(RemoteCollection.CollectionID, LinkDetails.Collection)
428+
Assert.AreEqual(CreatedLink.Id, LinkDetails.Id)
429+
System.Console.WriteLine("CHECKUP 1 by link: Collection ID " & RemoteCollection.CollectionID & " (" & RemoteTestFolderName & ") shared as view/download link with ID: " & SharedCollection.Link)
430+
424431
'Test for success
425432
SharedCollection = Me.IOClient.ApiClient.Collection.GetCollection(Me.IOClient.CurrentAuthenticationContextUserID, RemoteCollection.CollectionID)
426433
Assert.IsTrue(SharedCollection.HasLink)
427434
Assert.IsNotNull(SharedCollection.Link)
428435
Assert.IsNotEmpty(SharedCollection.Link)
429-
System.Console.WriteLine("CHECKUP: Collection ID " & RemoteCollection.CollectionID & " (" & RemoteTestFolderName & ") shared as view/download link with ID: " & SharedCollection.Link)
436+
System.Console.WriteLine("CHECKUP 2 by collection: Collection ID " & RemoteCollection.CollectionID & " (" & RemoteTestFolderName & ") shared as view/download link with ID: " & SharedCollection.Link)
430437

431438
'Remove sharing again
432439
Me.IOClient.ApiClient.Link.DeleteLink(Me.IOClient.CurrentAuthenticationContextUserID, CreatedLink.Id)

0 commit comments

Comments
 (0)