Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
VideoLAN
medialibrary
Commits
b75e9ac5
Commit
b75e9ac5
authored
May 22, 2014
by
Hugo Beauzée-Luyssen
Browse files
Album: Add a fetch from DB unit test
parent
78ebbafe
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/IAlbum.h
View file @
b75e9ac5
...
...
@@ -11,6 +11,7 @@ class IAlbum
{
public:
virtual
~
IAlbum
()
{}
virtual
unsigned
int
id
()
const
=
0
;
virtual
const
std
::
string
&
name
()
=
0
;
virtual
unsigned
int
releaseYear
()
=
0
;
virtual
const
std
::
string
&
shortSummary
()
=
0
;
...
...
test/Albums.cpp
View file @
b75e9ac5
#include
"gtest/gtest.h"
#include
"IMediaLibrary.h"
#include
"I
File
.h"
#include
"I
Album
.h"
class
Albums
:
public
testing
::
Test
{
...
...
@@ -35,3 +35,17 @@ TEST_F( Albums, Create )
ASSERT_EQ
(
a
,
a2
);
}
TEST_F
(
Albums
,
Fetch
)
{
auto
a
=
ml
->
createAlbum
(
"album"
);
// Clear the cache
delete
ml
;
SetUp
();
auto
a2
=
ml
->
album
(
"album"
);
// The shared pointer are expected to point to a different instance
ASSERT_NE
(
a
,
a2
);
ASSERT_EQ
(
a
->
id
(),
a2
->
id
()
);
}
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment