Lumiera  0.pre.03
»edit your freedom«
session-manager-test.cpp
Go to the documentation of this file.
1 /*
2  SessionManager(Test) - accessing, loading and saving the Session/Model
3 
4  Copyright (C) Lumiera.org
5  2008, Hermann Vosseler <Ichthyostega@web.de>
6 
7  This program is free software; you can redistribute it and/or
8  modify it under the terms of the GNU General Public License as
9  published by the Free Software Foundation; either version 2 of
10  the License, or (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 
21 * *****************************************************/
22 
28 #include "lib/test/run.hpp"
31 //#include "lib/util.hpp"
32 
33 //using std::string;
34 
35 
36 namespace steam {
37 namespace mobject {
38 namespace session {
39 namespace test {
40 
41 
42  /***************************************************************************/
49  class SessionManager_test : public Test
50  {
51  virtual void
52  run (Arg arg)
53  {
55  clearSession();
57 
58  clearSession();
60  string serialized;
61  saveSession (serialized);
62  loadSession (serialized);
63  CHECK (checkTestsession1());
64  }
65 
66 
68  void
70  {
71  PSess sess = Session::current;
72  CHECK (sess->isValid());
73  }
74 
75 
81  void
83  {
84  UNIMPLEMENTED ("clear objects in current session");
86  }
87 
88 
93  void
95  {
96  UNIMPLEMENTED ("construct a pristine session");
98  }
99 
100 
106  void
108  {
109  UNIMPLEMENTED ("rebuild session using a mock serialiser");
110  }
111 
112 
118  void
119  loadSession (const string& src)
120  {
121  UNIMPLEMENTED ("loading real session");
122  }
123 
124 
129  void
130  saveSession (string& dest)
131  {
132  UNIMPLEMENTED ("Serialise current session");
133  }
134  };
135 
136 
138  LAUNCHER (SessionManager_test, "function session");
139 
140 
141 
142 }}}} // namespace steam::mobject::session::test
virtual void reset()=0
reset all session config and start with a pristine default session.
Definition: run.hpp:49
Check the session management operations provided by mobject::session::Session This includes accessing...
static session::SessManager & current
access point to the current Session
Definition: session.hpp:129
Steam-Layer implementation namespace root.
Namespace of Session and user visible high-level objects.
Definition: sequence.hpp:74
void buildTestsession1()
Create a Test Session configuration usable for various Tests.
Simple test class runner.
creation, access and Session lifecycle Interface.
Definition: session.hpp:161
virtual void clear()=0
clear current session contents without resetting overall session config.
bool checkTestsession1()
Analyse the current (global) Session to verify the configuration of "Test-Session 1"...
Dummy session content prepared for unit test.
Primary Interface to the current Session.