public void TestInitializer() { using (var manager = new RessourceXmlService(this.LogManager)) { Assert.IsNull(manager.Culture); Assert.IsFalse(manager.IsInitialized); } }
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); } } }
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); } } }
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>(); } } }
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); } } }
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); } } }
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); } } }
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); } } } }