OpenKeyWord  Build Tag: jenkins-DoxyGen_EN-107, Build ID: 2015-03-08_20-51-06
 All Classes Namespaces Functions Variables Properties Pages
OKW.Test_FrameObjectDictionary Class Reference

This is a test class for FrameObjectDictionaryTest and is intended to contain all FrameObjectDictionaryTest Unit Tests. More...

Collaboration diagram for OKW.Test_FrameObjectDictionary:

Public Member Functions

void MyTestFixtureSetUp ()
 
void GetObjectByName_Window ()
 A test for CreateInstanceByObjectName.
 
void GetObjectByName_WindowAndChild ()
 A test for CreateInstanceByObjectName.
 
void InitTest ()
 
void TC_CreatInstanceByObjectName_OKWFrameObjectWindowNotFoundException_1 ()
 
void TC_CreatInstanceByObjectName__OKWFrameObjectWindowNotFoundException ()
 
void TC_CreatInstanceByObjectName_OKWFrameObjectChildNotFoundException ()
 

Private Attributes

FrameObjectDictionary target
 

Detailed Description

This is a test class for FrameObjectDictionaryTest and is intended to contain all FrameObjectDictionaryTest Unit Tests.

Member Function Documentation

void OKW.Test_FrameObjectDictionary.InitTest ( )
Author
Zoltan Hrabovszki
Date
2014-09-28
103  {
104  object actual;
105 
106  // ------------------------------------------------------------------------------------
107  //
108  // Frame laden.
109  actual = this.target.GetObjectByName("Rechner", "Taste_3");
110 
111  // Prüfen ob die erwarteten Elemente Rechner, Taste_3 vorhanden sind.
112  // Does the "Rechner" exists?
113  bool object_Exists = this.target.__FrameObjectDictionary.ContainsKey("Rechner");
114  Assert.AreEqual(true, object_Exists);
115 
116  // Is the Child also there?
117  object_Exists = this.target.__FrameObjectDictionary.ContainsKey("Rechner.Taste_3");
118  Assert.AreEqual(true, object_Exists);
119 
120  // ------------------------------------------------------------------------------------
121  // Nach der Initialisiserung Dürfen die Objekte "Rechner" und Taste_3 nicht existieren.
122  this.target.Init();
123 
124  object_Exists = this.target.__FrameObjectDictionary.ContainsKey("Rechner");
125  Assert.AreEqual(false, object_Exists);
126 
127  // Is the Child also there?
128  object_Exists = this.target.__FrameObjectDictionary.ContainsKey("Rechner.Taste_3");
129  Assert.AreEqual(false, object_Exists);
130  }
void OKW.Test_FrameObjectDictionary.TC_CreatInstanceByObjectName__OKWFrameObjectWindowNotFoundException ( )
Author
Zoltan Hrabovszki
Date
2014-09-28
190  {
191  object actual;
192 
193  try
194  {
195  actual = this.target.GetObjectByName("RechnerNotExists","Taste_3");
196  Assert.Fail();
197 
198  }
199  catch ( OKWFrameObjectWindowNotFoundException )
200  {
201  Assert.Pass("OKWFrameObjectWindowNotFoundException wurde ausgelöst, das ist für diesen Test OK!");
202  }
203  catch (Exception e)
204  {
205  System.Console.WriteLine("Exception: " + e.GetType().FullName);
206  System.Console.WriteLine("Nachricht: " + e.Message);
207  Assert.Fail("Falsche Exception: " + e.Message);
208  }
209  }
void OKW.Test_FrameObjectDictionary.TC_CreatInstanceByObjectName_OKWFrameObjectChildNotFoundException ( )
Author
Zoltan Hrabovszki
Date
2014-09-28
230  {
231  object actual;
232 
233  try
234  {
235  actual = this.target.GetObjectByName("Rechner", "TasteNotExists");
236  Assert.Fail();
237 
238  }
239  catch (OKWFrameObjectChildNotFoundException)
240  {
241  Assert.Pass("OKWFrameObjectWindowNotFoundException wurde ausgelöst, das ist für diesen Test OK!");
242  }
243  catch (Exception e)
244  {
245  System.Console.WriteLine("Exception: " + e.GetType().FullName);
246  System.Console.WriteLine("Nachricht: " + e.Message);
247  Assert.Fail("Falsche Exception: " + e.Message);
248  }
249  }
void OKW.Test_FrameObjectDictionary.TC_CreatInstanceByObjectName_OKWFrameObjectWindowNotFoundException_1 ( )
Author
Zoltan Hrabovszki
Date
2014-09-28
150  {
151  object actual;
152 
153  try
154  {
155  actual = this.target.GetObjectByName("RechnerNotExists");
156  Assert.Fail();
157 
158  }
159  catch ( OKWFrameObjectWindowNotFoundException )
160  {
161  Assert.Pass("OKWFrameObjectWindowNotFoundException wurde ausgelöst, das ist für diesen Test OK!");
162  }
163  catch (Exception e)
164  {
165  System.Console.WriteLine("Exception: " + e.GetType().FullName);
166  System.Console.WriteLine("Nachricht: " + e.Message);
167  Assert.Fail("Falsche Exception: " + e.Message);
168  }
169  }

The documentation for this class was generated from the following file: