[longomatch] Make TimelineEvent IStorable



commit 0d0cfa297c90dd05d0766a11f513a610b88c885c
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Tue Mar 17 12:14:57 2015 +0100

    Make TimelineEvent IStorable

 LongoMatch.Core/Store/TimelineEvent.cs |    3 ++-
 Tests/DB/TestStorage.cs                |    3 +++
 2 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/LongoMatch.Core/Store/TimelineEvent.cs b/LongoMatch.Core/Store/TimelineEvent.cs
index 97f3176..187cf55 100644
--- a/LongoMatch.Core/Store/TimelineEvent.cs
+++ b/LongoMatch.Core/Store/TimelineEvent.cs
@@ -32,10 +32,11 @@ namespace LongoMatch.Core.Store
        /// </summary>
 
        [Serializable]
-       public class  TimelineEvent : PixbufTimeNode, IIDObject
+       public class  TimelineEvent : PixbufTimeNode, IStorable
        {
 
                #region Constructors
+
                public TimelineEvent ()
                {
                        Drawings = new List<FrameDrawing> ();
diff --git a/Tests/DB/TestStorage.cs b/Tests/DB/TestStorage.cs
index d3dfa90..f6c9539 100644
--- a/Tests/DB/TestStorage.cs
+++ b/Tests/DB/TestStorage.cs
@@ -300,6 +300,9 @@ namespace Tests.DB
                        Assert.AreEqual (1 + 1 + 10, db.DocumentCount);
                        storage.Store<Project> (p);
                        Assert.AreEqual (1 + 1 + 10, db.DocumentCount);
+
+                       Project p2 = storage.Retrieve<Project> (p.ID);
+                       Assert.AreEqual (p.Timeline.Count, p2.Timeline.Count);
                }
        }
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]