Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mantle-api
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Eclipse Projects
Eclipse openpass
mantle-api
Commits
b423678f
Commit
b423678f
authored
3 years ago
by
Matthias Greuter
Browse files
Options
Downloads
Patches
Plain Diff
Extend MockEntities for proper usage in tests
parent
705d8cbf
No related branches found
No related tags found
1 merge request
!16
BMW Dev-branch
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
MantleAPI/test/MantleAPI/Test/test_utils.h
+4
-4
4 additions, 4 deletions
MantleAPI/test/MantleAPI/Test/test_utils.h
with
4 additions
and
4 deletions
MantleAPI/test/MantleAPI/Test/test_utils.h
+
4
−
4
View file @
b423678f
...
...
@@ -126,7 +126,7 @@ class MockQueryService : public mantle_api::ILaneLocationQueryService
class
MockPedestrian
:
public
mantle_api
::
IPedestrian
{
public:
mantle_api
::
UniqueId
GetUniqueId
()
const
override
{
return
0
;
}
MOCK_METHOD
(
mantle_api
::
UniqueId
,
GetUniqueId
,
(),
(
const
,
override
));
void
SetName
(
const
std
::
string
&
name
)
override
{
name_
=
name
;
}
const
std
::
string
&
GetName
()
const
override
{
return
name_
;
}
...
...
@@ -155,7 +155,7 @@ class MockPedestrian : public mantle_api::IPedestrian
MOCK_METHOD
(
void
,
SetAssignedLaneIds
,
(
const
std
::
vector
<
std
::
uint64_t
>&
ids
),
(
override
));
MOCK_METHOD
(
std
::
vector
<
std
::
uint64_t
>
,
GetAssignedLaneIds
,
(),
(
const
,
override
));
void
SetProperties
(
std
::
unique_ptr
<
mantle_api
::
EntityProperties
>
properties
)
override
{
std
::
ignore
=
properties
;
}
void
SetProperties
(
std
::
unique_ptr
<
mantle_api
::
EntityProperties
>
properties
)
override
{
properties_
=
std
::
move
(
properties
)
;
}
mantle_api
::
PedestrianProperties
*
GetProperties
()
const
override
{
return
static_cast
<
mantle_api
::
PedestrianProperties
*>
(
properties_
.
get
());
...
...
@@ -169,7 +169,7 @@ class MockPedestrian : public mantle_api::IPedestrian
class
MockStaticObject
:
public
mantle_api
::
IStaticObject
{
public:
mantle_api
::
UniqueId
GetUniqueId
()
const
override
{
return
0
;
}
MOCK_METHOD
(
mantle_api
::
UniqueId
,
GetUniqueId
,
(),
(
const
,
override
));
void
SetName
(
const
std
::
string
&
name
)
override
{
name_
=
name
;
}
const
std
::
string
&
GetName
()
const
override
{
return
name_
;
}
...
...
@@ -198,7 +198,7 @@ class MockStaticObject : public mantle_api::IStaticObject
MOCK_METHOD
(
void
,
SetAssignedLaneIds
,
(
const
std
::
vector
<
std
::
uint64_t
>&
ids
),
(
override
));
MOCK_METHOD
(
std
::
vector
<
std
::
uint64_t
>
,
GetAssignedLaneIds
,
(),
(
const
,
override
));
void
SetProperties
(
std
::
unique_ptr
<
mantle_api
::
EntityProperties
>
properties
)
override
{
std
::
ignore
=
properties
;
}
void
SetProperties
(
std
::
unique_ptr
<
mantle_api
::
EntityProperties
>
properties
)
override
{
properties_
=
std
::
move
(
properties
)
;
}
mantle_api
::
StaticObjectProperties
*
GetProperties
()
const
override
{
return
static_cast
<
mantle_api
::
StaticObjectProperties
*>
(
properties_
.
get
());
...
...
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