lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [lucenenet] bongohrtech commented on a change in pull request #287: Implemenation of "System Properties" in .NET (addresses #254)
Date Wed, 20 May 2020 02:54:12 GMT

bongohrtech commented on a change in pull request #287:
URL: https://github.com/apache/lucenenet/pull/287#discussion_r427713071



##########
File path: src/Lucene.Net.Tests.TestFramework/Configuration/TestSystemProperties.cs
##########
@@ -0,0 +1,94 @@
+´╗┐using Lucene.Net.Search;
+using Lucene.Net.Util;
+using Microsoft.Extensions.Configuration;
+using Microsoft.VisualBasic.CompilerServices;
+using NUnit.Framework;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Security;
+using System.Text;
+
+namespace Lucene.Net.Configuration
+{
+
+
+    [TestFixture]
+    class TestSystemProperties : LuceneTestCase
+    {
+
+        //[OneTimeSetUp]
+        //public override void BeforeClass()
+        //{
+        //    ConfigurationFactory = new TestConfigurationFactory();
+        //    base.BeforeClass();
+        //}
+        [Test]
+        public virtual void EnvironmentTest2()
+        {
+            string testKey = "lucene:tests:setting";
+            string testValue = "test.success";
+            Lucene.Net.Configuration.ConfigurationSettings.CurrentConfiguration[testKey]
= testValue;
+            Assert.AreEqual(Lucene.Net.Configuration.ConfigurationSettings.CurrentConfiguration[testKey],
testValue);
+        }
+        [Test]
+        public virtual void SetTest()
+        {
+            Assert.AreEqual("fr", Lucene.Net.Configuration.ConfigurationSettings.CurrentConfiguration["tests:locale"]);
+            Lucene.Net.Configuration.ConfigurationSettings.CurrentConfiguration["tests:locale"]
= "en";
+            Assert.AreEqual("en", Lucene.Net.Configuration.ConfigurationSettings.CurrentConfiguration["tests:locale"]);

Review comment:
       Its internal, how do i do this?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message