Пример #1
0
 protected override void ParserHandler(IXmlParser parser)
 {
     foreach (XmlNode node in parser.GetNodeList(SettingsNode))
     {
         var    conString            = parser.GetNodeAttributeValue(ConnectionStringAttribute, node);
         var    login                = parser.GetNodeAttributeValue(LoginAttribute, node);
         var    password             = parser.GetNodeAttributeValue(PasswordAttribute, node);
         string fullConnectionString = ConstructFullConnectionString(conString, login, password);
         HolidayPoolingDatabase db   = TechnicalEnumConverter.
                                       HolidayPoolingDatabaseFromString(parser.GetNodeAttributeValue(NameAttribute, node));
         ConnectionManager.AddConnection(db, fullConnectionString);
     }
 }
 public void HolidayPoolingFromString_ShouldReturnCorrectEnumValue(string hp, HolidayPoolingDatabase expected)
 {
     Assert.AreEqual(expected, TechnicalEnumConverter.HolidayPoolingDatabaseFromString(hp));
 }
 public void HolidayPoolingDatabaseToString_ShouldReturnCorrectStringValue(HolidayPoolingDatabase hp, string expected)
 {
     Assert.AreEqual(expected, TechnicalEnumConverter.HolidayPoolingDatabaseToString(hp));
 }