Shaka Packager SDK
mock_mpd_builder.cc
1 #include "packager/mpd/base/mock_mpd_builder.h"
2 
3 #include "packager/mpd/base/media_info.pb.h"
4 
5 namespace shaka {
6 namespace {
7 const char kEmptyLang[] = "";
8 const MpdOptions kDefaultMpdOptions;
9 } // namespace
10 
11 // Doesn't matter what values get passed to the super class' constructor.
12 // All methods used for testing should be mocked.
13 MockMpdBuilder::MockMpdBuilder() : MpdBuilder(kDefaultMpdOptions) {}
14 MockMpdBuilder::~MockMpdBuilder() {}
15 
16 MockPeriod::MockPeriod(uint32_t period_id, double start_time_in_seconds)
17  : Period(period_id,
18  start_time_in_seconds,
19  kDefaultMpdOptions,
20  &sequence_counter_) {}
21 
22 MockAdaptationSet::MockAdaptationSet()
23  : AdaptationSet(kEmptyLang, kDefaultMpdOptions, &sequence_counter_) {}
24 
25 MockAdaptationSet::~MockAdaptationSet() {}
26 
27 MockRepresentation::MockRepresentation(uint32_t representation_id)
28  : Representation(MediaInfo(),
29  kDefaultMpdOptions,
30  representation_id,
31  std::unique_ptr<RepresentationStateChangeListener>()) {}
32 MockRepresentation::~MockRepresentation() {}
33 
34 } // namespace shaka
shaka
All the methods that are virtual are virtual for mocking.
Definition: gflags_hex_bytes.cc:11