Ejemplo n.º 1
0
 public void TestInitializer()
 {
     using (var manager = new RessourceXmlService(this.LogManager))
     {
         Assert.IsNull(manager.Culture);
         Assert.IsFalse(manager.IsInitialized);
     }
 }
Ejemplo n.º 2
0
 public void TestGetSetRessourceAsync()
 {
     using (var streamsource = new FileSource("./GETSET/RessourceXml.xml"))
     {
         using (var manager = new RessourceXmlService(this.LogManager))
         {
             manager.Initialize(CultureInfo.GetCultureInfo("en"), streamsource);
             this._tester.TestGetSetRessourceAsync(manager);
         }
     }
 }
Ejemplo n.º 3
0
 public void TestGeSettRessource()
 {
     using (var streamsource = new FileSource("./GETSET/RessourceXml.xml", FileSourceSaveModeEnum.KEEPALLPREVIOUSVERSION))
     {
         using (var manager = new RessourceXmlService(this.LogManager))
         {
             manager.Initialize(CultureInfo.GetCultureInfo("en"), streamsource);
             this._tester.TestGetSetRessource(manager);
         }
     }
 }
Ejemplo n.º 4
0
 public void FailInitialize()
 {
     using (var streamsource = new FileSource("./GETSET/RessourceXml.xml"))
     {
         using (var manager = new RessourceXmlService(this.LogManager))
         {
             manager.Invoking(x => x.Initialize(null, streamsource)).Should().Throw <ArgumentNullException>();
             manager.Invoking(x => x.Initialize(CultureInfo.GetCultureInfo("en"), null)).Should().Throw <ArgumentNullException>();
         }
     }
 }
Ejemplo n.º 5
0
 public void FailGroup()
 {
     using (var streamsource = new FileSource("./Group/RessourceXml.xml"))
     {
         using (var manager = new RessourceXmlService(this.LogManager))
         {
             manager.Initialize(CultureInfo.GetCultureInfo("en"), streamsource);
             this._tester.FailGroup(manager);
         }
     }
 }
Ejemplo n.º 6
0
 public void TestContainsRessource()
 {
     using (var streamsource = new FileSource("./Contains/RessourceXml.xml"))
     {
         using (var manager = new RessourceXmlService(this.LogManager))
         {
             manager.Initialize(CultureInfo.GetCultureInfo("en"), streamsource);
             this._tester.TestContainsRessource(manager);
         }
     }
 }
Ejemplo n.º 7
0
 public void TestIntialize()
 {
     using (var streamsource = new FileSource("./GETSET/RessourceXml.xml"))
     {
         using (var manager = new RessourceXmlService(this.LogManager))
         {
             manager.Initialize(CultureInfo.GetCultureInfo("en"), streamsource);
             Assert.IsTrue(manager.Culture == CultureInfo.GetCultureInfo("en"));
             Assert.IsTrue(manager.IsInitialized);
         }
     }
 }
Ejemplo n.º 8
0
 public void TestPerformanceGetRessource()
 {
     using (var streamsource = new FileSource("./Performance/RessourceXml.xml"))
     {
         using (var managerEn = new RessourceXmlService(this.LogManager))
         {
             managerEn.Initialize(CultureInfo.GetCultureInfo("en"), streamsource);
             using (var managerFr = new RessourceXmlService(this.LogManager))
             {
                 managerFr.Initialize(CultureInfo.GetCultureInfo("fr"), streamsource);
                 this._tester.TestPerformanceGetRessource(managerEn, managerFr);
             }
         }
     }
 }