[rygel] tests: Don't mock HTTPSeek class twice
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] tests: Don't mock HTTPSeek class twice
- Date: Fri, 1 Apr 2011 15:57:24 +0000 (UTC)
commit 33be1c2cc24bd3d9a96a62a0b0ff4fa39997a8ca
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Wed Mar 30 17:12:59 2011 +0300
tests: Don't mock HTTPSeek class twice
tests/rygel-http-gst-response-test.vala | 13 +++++--------
tests/rygel-http-response-test.vala | 13 +++++++++++++
tests/rygel-http-seekable-response-test.vala | 13 -------------
3 files changed, 18 insertions(+), 21 deletions(-)
---
diff --git a/tests/rygel-http-gst-response-test.vala b/tests/rygel-http-gst-response-test.vala
index 535984e..2ff2b69 100644
--- a/tests/rygel-http-gst-response-test.vala
+++ b/tests/rygel-http-gst-response-test.vala
@@ -128,15 +128,12 @@ public class Rygel.MediaItem {
}
}
-internal abstract class Rygel.HTTPSeek : GLib.Object {
- // These are either number of bytes or microseconds
- public int64 start;
- public int64 stop;
- public int64 length;
- public int64 total_length;
-}
-internal class Rygel.HTTPTimeSeek : Rygel.HTTPSeek {}
+internal class Rygel.HTTPTimeSeek : Rygel.HTTPSeek {
+ public HTTPTimeSeek (int64 start, int64 stop) {
+ base (start, stop);
+ }
+}
public errordomain Rygel.HTTPRequestError {
NOT_FOUND = Soup.KnownStatusCode.NOT_FOUND
diff --git a/tests/rygel-http-response-test.vala b/tests/rygel-http-response-test.vala
index dfebc8e..32c9a25 100644
--- a/tests/rygel-http-response-test.vala
+++ b/tests/rygel-http-response-test.vala
@@ -232,3 +232,16 @@ public class Rygel.HTTPClient : GLib.Object, StateMachine {
this.completed ();
}
}
+
+public class Rygel.HTTPSeek : GLib.Object {
+ public int64 start { get; private set; }
+ public int64 stop { get; private set; }
+ public int64 length { get; private set; }
+
+ public HTTPSeek (int64 start, int64 stop) {
+ this.start = start;
+ this.stop = stop;
+
+ this.length = stop - start + 1;
+ }
+}
diff --git a/tests/rygel-http-seekable-response-test.vala b/tests/rygel-http-seekable-response-test.vala
index 1e4eac9..097ac9a 100644
--- a/tests/rygel-http-seekable-response-test.vala
+++ b/tests/rygel-http-seekable-response-test.vala
@@ -24,19 +24,6 @@
using Soup;
using Gee;
-public class Rygel.HTTPSeek : GLib.Object {
- public int64 start { get; private set; }
- public int64 stop { get; private set; }
- public int64 length { get; private set; }
-
- public HTTPSeek (int64 start, int64 stop) {
- this.start = start;
- this.stop = stop;
-
- this.length = stop - start + 1;
- }
-}
-
public class Rygel.HTTPSeekableResponseTest : Rygel.HTTPResponseTest {
private File dummy_file;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]