Пример #1
0
 public void TestConstructorPathwayExceptionMessage()
 {
     string message = null;
     PathwayException testPathwayException = new PathwayException(message);
     Assert.IsNotNull(testPathwayException, "Constructor of type, PathwayException failed to create instance.");
     Assert.Fail("Create or modify test(s).");
 }
Пример #2
0
 /// <summary>
 /// register the object to this set.
 /// </summary>
 /// <param name="obj">the registered object.</param>
 private void RegisterObject(PPathwayObject obj)
 {
     string key = obj.EcellObject.Key;
     PathwayException ex = new PathwayException(
         string.Format(MessageResources.ErrAlrExist, key));
     if (obj is PPathwaySystem)
     {
         if (m_systems.ContainsKey(key))
             throw ex;
         m_systems.Add(key, (PPathwaySystem)obj);
     }
     else if (obj is PPathwayVariable)
     {
         if (m_variables.ContainsKey(key))
             throw ex;
         m_variables.Add(key, (PPathwayVariable)obj);
     }
     else if (obj is PPathwayProcess)
     {
         if (m_processes.ContainsKey(key))
             throw ex;
         m_processes.Add(key, (PPathwayProcess)obj);
     }
     else if (obj is PPathwayText)
     {
         if (m_processes.ContainsKey(key))
             throw ex;
         m_texts.Add(key, (PPathwayText)obj);
     }
     else if (obj is PPathwayStepper)
     {
         if (m_steppers.ContainsKey(key))
             throw ex;
         m_steppers.Add(key, (PPathwayStepper)obj);
     }
 }
Пример #3
0
 public void TearDown()
 {
     _unitUnderTest = null;
 }
Пример #4
0
 public void SetUp()
 {
     _unitUnderTest = new PathwayException();
 }