public void AddSmartView()
 {
     DatabaseContextTestCase <SmartView> .RunTest(
         (c, i) => c.AddSmartView(i),
         (c, i) => c.RemoveSmartView(i),
         c => c.SmartViews.Count(),
         (i, v) => i.Name = v,
         c => c.SmartViews.ElementAt(0).Name);
 }
 public void AddTag()
 {
     DatabaseContextTestCase <Tag> .RunTest(
         (c, i) => c.AddTag(i),
         (c, i) => c.RemoveTag(i),
         c => c.Tags.Count(),
         (i, v) => i.Name = v,
         c => c.Tags.ElementAt(0).Name);
 }
 public void AddContext()
 {
     DatabaseContextTestCase <Context> .RunTest(
         (c, i) => c.AddContext(i),
         (c, i) => c.RemoveContext(i),
         c => c.Contexts.Count(),
         (i, v) => i.Name = v,
         c => c.Contexts.ElementAt(0).Name);
 }
 public void AddFolder()
 {
     DatabaseContextTestCase <Folder> .RunTest(
         (c, i) => c.AddFolder(i),
         (c, i) => c.RemoveFolder(i),
         c => c.Folders.Count(),
         (i, v) => i.Name = v,
         c => c.Folders.ElementAt(0).Name);
 }
 public void AddTask()
 {
     DatabaseContextTestCase <Task> .RunTest(
         (c, i) => c.AddTask(i),
         (c, i) => c.RemoveTask(i),
         c => c.Tasks.Count(),
         (i, v) => i.Title = v,
         c => c.Tasks.ElementAt(0).Title);
 }
            public static void RunTest(Action <IDatabaseContext, TItem> addItem, Action <IDatabaseContext, TItem> removeItem, Func <IDatabaseContext, int> getItemCount, Action <TItem, string> setItemProperty, Func <IDatabaseContext, string> getItemProperty)
            {
                var instance = new DatabaseContextTestCase <TItem>(addItem, removeItem, getItemCount, setItemProperty, getItemProperty);

                instance.RunTestCore();
            }