Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FIT-Connect-SDK - .NET
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FIT-Connect
FIT-Connect-SDK - .NET
Commits
42023930
Commit
42023930
authored
1 year ago
by
Klaus Fischer
Browse files
Options
Downloads
Patches
Plain Diff
feature: renamed tests
parent
a404aa1f
No related branches found
No related tags found
1 merge request
!94
Epic/1256 bidiko
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
FitConnect/Interfaces/Subscriber/ISubscriber.cs
+0
-6
0 additions, 6 deletions
FitConnect/Interfaces/Subscriber/ISubscriber.cs
FitConnect/Sender.cs
+1
-1
1 addition, 1 deletion
FitConnect/Sender.cs
Tests/E2ETest/ReplyChannelTest.cs
+29
-13
29 additions, 13 deletions
Tests/E2ETest/ReplyChannelTest.cs
with
30 additions
and
20 deletions
FitConnect/Interfaces/Subscriber/ISubscriber.cs
+
0
−
6
View file @
42023930
...
...
@@ -23,12 +23,6 @@ public interface ISubscriber : IFitConnectClient {
/// <returns>A subscriber object with a submission</returns>
public
Task
<
IReceivedSubmission
>
RequestSubmissionAsync
(
Guid
submissionId
);
/// <summary>
/// Loads a single Submission by id.
/// </summary>
/// <param name="replyId">unique identifier of a <see cref="Submission" /></param>
/// <returns>A subscriber object with a submission</returns>
public
Task
<
IReceivedReply
>
RequestReplyAsync
(
Guid
replyId
);
/// <summary>
/// Loads a single Submission.
...
...
This diff is collapsed.
Click to expand it.
FitConnect/Sender.cs
+
1
−
1
View file @
42023930
...
...
@@ -160,7 +160,7 @@ public class Sender : FitConnectClient, ISender {
var
submissions
=
new
List
<
IReceivedReply
>();
foreach
(
var
reply
in
replies
)
{
var
submission
=
await
subscriber
.
RequestReplyAsync
(
reply
.
ReplyId
);
var
submission
=
await
(
subscriber
as
Subscriber
)!
.
RequestReplyAsync
(
reply
.
ReplyId
);
submissions
.
Add
(
submission
);
}
...
...
This diff is collapsed.
Click to expand it.
Tests/E2ETest/ReplyChannelTest.cs
+
29
−
13
View file @
42023930
...
...
@@ -64,13 +64,13 @@ public class ReplyChannelTest : EndToEndTestBase {
[
Order
(
5
)]
[
Test
]
public
void
GenerateJwkPair
()
{
public
void
T005_
GenerateJwkPair
()
{
// PublicKey = Jwk.FromJson(Settings.PublicKeyEncryption);
}
[
Order
(
10
)]
[
Test
]
public
void
SendingSubmission
()
{
public
void
T010_
SendingSubmission
()
{
var
outgoing
=
SendableSubmission
.
Builder
()
.
SetDestination
(
Guid
.
Parse
(
Configuration
[
"destination:id"
]))
.
SetServiceType
(
Configuration
[
"destination:serviceIdentifier"
],
"Reply channel test"
)
...
...
@@ -119,7 +119,7 @@ public class ReplyChannelTest : EndToEndTestBase {
[
Test
]
[
Order
(
20
)]
public
void
Sender_GetSubmissionState
()
{
public
void
T020_
Sender_GetSubmissionState
()
{
// Act
var
status
=
Sender
.
GetStatusForSubmissionAsync
(
_submission
)
.
Result
;
...
...
@@ -130,7 +130,7 @@ public class ReplyChannelTest : EndToEndTestBase {
[
Test
]
[
Order
(
21
)]
public
void
Sender_GetEventLogAfterSubmit
()
{
public
void
T021_
Sender_GetEventLogAfterSubmit
()
{
// Act
var
status
=
(
Sender
as
Sender
)!
.
GetEventLogAsync
(
_submission
.
CaseId
,
DestinationId
).
Result
;
...
...
@@ -143,7 +143,7 @@ public class ReplyChannelTest : EndToEndTestBase {
[
Test
]
[
Order
(
30
)]
public
void
Subscriber_GetSubmissionState
()
{
public
void
T030_
Subscriber_GetSubmissionState
()
{
// Act
var
status
=
(
Subscriber
as
Subscriber
)!
.
GetEventLogAsync
(
_submission
.
CaseId
,
DestinationId
).
Result
;
...
...
@@ -156,14 +156,14 @@ public class ReplyChannelTest : EndToEndTestBase {
[
Test
]
[
Order
(
39
)]
public
void
Subscriber_GetAvailableSubmissionsForSubscriber
()
{
public
void
T039_
Subscriber_GetAvailableSubmissionsForSubscriber
()
{
Subscriber
.
GetAvailableSubmissionsAsync
(
DestinationId
).
Result
.
ToList
().
Count
.
Should
().
BeGreaterOrEqualTo
(
1
);
}
[
Test
]
[
Order
(
40
)]
public
void
Subscriber_RequestSubmission
()
{
public
void
T040_
Subscriber_RequestSubmission
()
{
var
receivedSubmission
=
Subscriber
.
RequestSubmissionAsync
(
_submission
.
SubmissionId
).
Result
;
...
...
@@ -223,13 +223,13 @@ public class ReplyChannelTest : EndToEndTestBase {
[
Test
]
[
Order
(
45
)]
public
void
Sender_ReceiveReply
()
{
public
void
T045_
Sender_ReceiveReply
()
{
var
reply
=
Sender
.
ReceiveReplyForCase
(
_submission
.
CaseId
,
Settings
.
PrivateDecryptionKeys
.
First
()).
Result
;
}
[
Test
]
[
Order
(
50
)]
public
void
Sender_GetEventLog_AfterAccepting
()
{
public
void
T050_
Sender_GetEventLog_AfterAccepting
()
{
// Act
var
status
=
(
Sender
as
Sender
)!
.
GetEventLogAsync
(
_submission
.
CaseId
,
DestinationId
).
Result
;
...
...
@@ -248,7 +248,7 @@ public class ReplyChannelTest : EndToEndTestBase {
[
Test
]
[
Order
(
51
)]
public
void
Sender_GetSubmissionState_AfterAccepting
()
{
public
void
T051_
Sender_GetSubmissionState_AfterAccepting
()
{
var
status
=
Sender
.
GetStatusForSubmissionAsync
(
_submission
).
Result
;
status
.
SubmissionState
.
Should
().
Be
(
EventType
.
Accept
);
...
...
@@ -257,7 +257,7 @@ public class ReplyChannelTest : EndToEndTestBase {
[
Test
]
[
Order
(
60
)]
public
void
Sender_GetStatus_AfterAccepting
()
{
public
void
T060_
Sender_GetStatus_AfterAccepting
()
{
// Act
var
(
status
,
problems
)
=
Sender
.
GetStatusForSubmissionAsync
(
_submission
).
Result
;
...
...
@@ -268,7 +268,7 @@ public class ReplyChannelTest : EndToEndTestBase {
[
Test
]
[
Order
(
61
)]
public
void
Sender_GetStatusForSubmission_FailsOnManipulatedAuthenticationTags
()
{
public
void
T061_
Sender_GetStatusForSubmission_FailsOnManipulatedAuthenticationTags
()
{
var
manipulated
=
new
SentSubmission
(
_submission
.
SubmissionId
,
_submission
.
CaseId
,
_submission
.
DestinationId
,
new
AuthenticationTags
()
{
...
...
@@ -288,9 +288,25 @@ public class ReplyChannelTest : EndToEndTestBase {
[
Test
]
[
Order
(
62
)]
public
void
Subscriber_GetStatusForSubmission
()
{
public
void
T062_
Subscriber_GetStatusForSubmission
()
{
Subscriber
.
GetStatusForSubmission
(
_submission
.
DestinationId
,
_submission
.
CaseId
,
_submission
.
SubmissionId
).
Result
.
SubmissionState
.
Should
().
Be
(
EventType
.
Accept
);
}
[
Test
]
[
Order
(
70
)]
public
void
T070_Sender_AddSubmissionToCase
()
{
}
[
Test
]
[
Order
(
80
)]
public
void
T080_Subscriber_ClearCase
()
{
var
availableSubmissions
=
Subscriber
.
GetAvailableSubmissionsAsync
(
Settings
.
DestinationId
).
Result
;
foreach
(
var
availableSubmission
in
availableSubmissions
)
{
var
receivedSubmission
=
Subscriber
.
RequestSubmissionAsync
(
availableSubmission
.
SubmissionId
).
Result
;
receivedSubmission
.
AcceptSubmissionAsync
().
Wait
();
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment