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
fd13ab2d
Commit
fd13ab2d
authored
2 years ago
by
Klaus Fischer
Browse files
Options
Downloads
Patches
Plain Diff
Unit testing the autoreject seems to be an overkill
parent
73d59bdc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!24
AutoReject planning#594
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
BasicUnitTest/AutoRejectTests.cs
+25
-3
25 additions, 3 deletions
BasicUnitTest/AutoRejectTests.cs
with
25 additions
and
3 deletions
BasicUnitTest/AutoRejectTests.cs
+
25
−
3
View file @
fd13ab2d
...
...
@@ -6,9 +6,11 @@ using System.Threading.Tasks;
using
Autofac
;
using
BasicUnitTest.Mocking
;
using
FitConnect
;
using
FitConnect.Encryption
;
using
FitConnect.Interfaces.Subscriber
;
using
FitConnect.Models
;
using
FitConnect.Services.Interfaces
;
using
FitConnect.Services.Models
;
using
FitConnect.Services.Models.v1.Submission
;
using
FluentAssertions
;
using
Microsoft.Extensions.Logging
;
...
...
@@ -65,14 +67,34 @@ public class AutoRejectTests {
}
[
Test
]
[
Ignore
(
"
SET Event log ist not valid
"
)]
[
Ignore
(
"
Overkill
"
)]
public
void
SuccessFullRequestTest
()
{
var
builder
=
MockDependencyContainer
.
Builder
();
builder
.
RegisterInstance
(
new
Mock
<
ILogger
>().
Object
);
var
uuid
=
Guid
.
NewGuid
().
ToString
();
var
subscriber
=
Client
.
GetSubscriber
(
builder
.
Build
());
var
container
=
builder
.
Build
();
var
encryptor
=
new
FitEncryption
(
container
.
Resolve
<
IFitConnectSettings
>().
PublicKeyEncryption
,
container
.
Resolve
<
ILogger
>());
var
submission
=
new
Submission
()
{
CaseId
=
Guid
.
NewGuid
().
ToString
(),
Id
=
uuid
,
DestinationId
=
Guid
.
NewGuid
().
ToString
(),
ServiceType
=
new
ServiceType
()
{
Description
=
"Dummy service"
,
Identifier
=
"url:leika:043049873549875398"
,
Name
=
"Name"
},
EncryptedData
=
encryptor
.
Encrypt
(
@"{""name"":""John Doe""}"
),
};
submission
.
EncryptedMetadata
=
encryptor
.
Encrypt
(
Sender
.
CreateMetadata
(
submission
));
var
subscriber
=
Client
.
GetSubscriber
(
container
);
var
subscriberWithSubmission
=
subscriber
.
RequestSubmissionAsync
(
uuid
).
Result
;
subscriberWithSubmission
.
Submission
.
Id
.
Should
().
Be
(
uuid
);
}
...
...
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