[longomatch] Add a test to check camera restore after event unload.
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Add a test to check camera restore after event unload.
- Date: Tue, 31 Mar 2015 17:38:02 +0000 (UTC)
commit 3a6e9ff17f27d45218ec367ced358d71d953d722
Author: Julien Moutte <julien fluendo com>
Date: Sun Mar 29 18:33:26 2015 +0200
Add a test to check camera restore after event unload.
Indeed after loading an event with a list of visible cameras
Tests/Services/TestPlayerController.cs | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/Tests/Services/TestPlayerController.cs b/Tests/Services/TestPlayerController.cs
index 40a599e..e6fa868 100644
--- a/Tests/Services/TestPlayerController.cs
+++ b/Tests/Services/TestPlayerController.cs
@@ -556,11 +556,20 @@ namespace Tests.Services
PreparePlayer ();
player.ElementLoadedEvent += (element, hasNext) => {
if (element == null) {
+ elementLoaded--;
+ } else {
elementLoaded++;
}
};
- player.UnloadCurrentEvent ();
+ // Load
+ player.LoadEvent (mfs, evt, evt.Start, true);
Assert.AreEqual (1, elementLoaded);
+ Assert.AreEqual (evt.CamerasVisible, player.CamerasVisible);
+ // Unload
+ player.UnloadCurrentEvent ();
+ Assert.AreEqual (0, elementLoaded);
+ // Check that cameras have been restored
+ Assert.AreSame (new List<int> { 0, 1 }, player.CamerasVisible);
}
[Test ()]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]