Example #1
0
 public void TestInitializer()
 {
     using (var manager = new XmlRessourceManager(this.LogManager))
     {
         Assert.IsNull(manager.Culture);
         Assert.IsFalse(manager.IsInitialized);
     }
 }
Example #2
0
 public void TestGetRessource()
 {
     using (var stream = File.Open("./Data/RessourceXml.xml", FileMode.Open))
     {
         using (var manager = new XmlRessourceManager(this.LogManager))
         {
             manager.Initialize(CultureInfo.GetCultureInfo("en"), stream);
             this._tester.TestGetRessource(manager);
         }
     }
 }
Example #3
0
 public void FailInitialize()
 {
     using (var stream = File.Open("./Data/RessourceXml.xml", FileMode.Open))
     {
         using (var manager = new XmlRessourceManager(this.LogManager))
         {
             manager.Invoking(x => x.Initialize(null, stream)).Should().Throw <ArgumentNullException>();
             manager.Invoking(x => x.Initialize(CultureInfo.GetCultureInfo("en"), null)).Should().Throw <ArgumentNullException>();
         }
     }
 }
Example #4
0
 public void TestIntialize()
 {
     using (var stream = File.Open("./Data/RessourceXml.xml", FileMode.Open))
     {
         using (var manager = new XmlRessourceManager(this.LogManager))
         {
             manager.Initialize(CultureInfo.GetCultureInfo("en"), stream);
             Assert.IsTrue(manager.Culture == CultureInfo.GetCultureInfo("en"));
             Assert.IsTrue(manager.IsInitialized);
         }
     }
 }