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
09e5b18b
Commit
09e5b18b
authored
2 years ago
by
Klaus Fischer
Browse files
Options
Downloads
Patches
Plain Diff
Renamed Methodes to Async
parent
385ba35e
No related branches found
No related tags found
1 merge request
!46
863 adding schemas
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
FitConnect/Interfaces/IRouter.cs
+2
-2
2 additions, 2 deletions
FitConnect/Interfaces/IRouter.cs
FitConnect/Router.cs
+3
-3
3 additions, 3 deletions
FitConnect/Router.cs
Tests/IntegrationTests/Routing/RoutingTests.cs
+3
-3
3 additions, 3 deletions
Tests/IntegrationTests/Routing/RoutingTests.cs
with
8 additions
and
8 deletions
FitConnect/Interfaces/IRouter.cs
+
2
−
2
View file @
09e5b18b
...
...
@@ -14,7 +14,7 @@ public interface IRouter {
/// var areas = GetAreas("Erlang*", out var _, 0, 10)
/// </example>
/// <returns></returns>
public
Task
<
IEnumerable
<
Area
>>
FindAreas
(
string
filter
,
int
offset
=
0
,
public
Task
<
IEnumerable
<
Area
>>
FindAreas
Async
(
string
filter
,
int
offset
=
0
,
int
limit
=
100
);
/// <summary>
...
...
@@ -27,7 +27,7 @@ public interface IRouter {
/// var areas = GetAreas("Erlang*", 0, 10)
/// </example>
/// <returns></returns>
public
Task
<
IEnumerable
<
Area
>>
FindAreas
(
List
<
string
>
filter
,
int
offset
=
0
,
public
Task
<
IEnumerable
<
Area
>>
FindAreas
Async
(
List
<
string
>
filter
,
int
offset
=
0
,
int
limit
=
100
);
...
...
This diff is collapsed.
Click to expand it.
FitConnect/Router.cs
+
3
−
3
View file @
09e5b18b
...
...
@@ -61,15 +61,15 @@ internal class Router : IRouter {
/// <param name="offset"></param>
/// <param name="limit"></param>
/// <returns></returns>
public
async
Task
<
IEnumerable
<
Area
>>
FindAreas
(
List
<
string
>
filter
,
int
offset
=
0
,
public
async
Task
<
IEnumerable
<
Area
>>
FindAreas
Async
(
List
<
string
>
filter
,
int
offset
=
0
,
int
limit
=
100
)
{
var
dto
=
await
_routeService
.
FindAreas
(
filter
,
offset
,
limit
);
// totalCount = dto?.TotalCount ?? 0;
return
dto
?.
Areas
??
new
List
<
Area
>();
}
public
async
Task
<
IEnumerable
<
Area
>>
FindAreas
(
string
filter
,
int
offset
=
0
,
int
limit
=
100
)
=>
await
FindAreas
(
new
List
<
string
>
{
filter
},
offset
,
limit
);
public
async
Task
<
IEnumerable
<
Area
>>
FindAreas
Async
(
string
filter
,
int
offset
=
0
,
int
limit
=
100
)
=>
await
FindAreas
Async
(
new
List
<
string
>
{
filter
},
offset
,
limit
);
private
bool
VerifySubmissionHost
(
Route
route
)
{
var
signature
=
new
JsonWebToken
(
route
.
DestinationSignature
);
...
...
This diff is collapsed.
Click to expand it.
Tests/IntegrationTests/Routing/RoutingTests.cs
+
3
−
3
View file @
09e5b18b
...
...
@@ -89,21 +89,21 @@ public class RoutingTests {
[
Test
]
public
void
GetAreas_ShouldGetAreasFromServer
()
{
// Arrange
var
areas
=
_router
.
FindAreas
(
"Furth*"
).
Result
;
var
areas
=
_router
.
FindAreas
Async
(
"Furth*"
).
Result
;
areas
.
Should
().
HaveCountGreaterThan
(
0
);
}
[
Test
]
public
void
GetAreas_ShouldGetAreasFromServerWithList
()
{
// Arrange
var
areas
=
_router
.
FindAreas
(
new
List
<
string
>
{
"Furth*"
}).
Result
;
var
areas
=
_router
.
FindAreas
Async
(
new
List
<
string
>
{
"Furth*"
}).
Result
;
areas
.
Should
().
HaveCountGreaterThan
(
0
);
}
[
Test
]
public
void
GetAreas_ShouldGetAreasFromServerWithListAndTwoArguments
()
{
// Arrange
var
areas
=
_router
.
FindAreas
(
new
List
<
string
>
{
"Furth*"
,
"Wald"
}).
Result
;
var
areas
=
_router
.
FindAreas
Async
(
new
List
<
string
>
{
"Furth*"
,
"Wald"
}).
Result
;
areas
.
Should
().
HaveCountGreaterThan
(
0
);
}
...
...
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