lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [08/50] [abbrv] lucenenet git commit: Added missing asserts to Core.Util.TestVersion.TestDeprecations()
Date Sun, 23 Oct 2016 13:01:54 GMT
Added missing asserts to Core.Util.TestVersion.TestDeprecations()


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/7517a735
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/7517a735
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/7517a735

Branch: refs/heads/master
Commit: 7517a735600bcb0fb7f35122860faed1b2bdd410
Parents: bff0161
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Sun Oct 16 06:23:31 2016 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Thu Oct 20 18:20:52 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Tests/core/Util/TestVersion.cs | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7517a735/src/Lucene.Net.Tests/core/Util/TestVersion.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/TestVersion.cs b/src/Lucene.Net.Tests/core/Util/TestVersion.cs
index 1510007..2eb6295 100644
--- a/src/Lucene.Net.Tests/core/Util/TestVersion.cs
+++ b/src/Lucene.Net.Tests/core/Util/TestVersion.cs
@@ -55,15 +55,15 @@ namespace Lucene.Net.Util
                 {
                     Assert.AreEqual(LuceneVersion.LUCENE_CURRENT, values[i], "Last constant
must be LUCENE_CURRENT");
                 }
-                /*bool dep = typeof(Version).GetField(values[i].Name()).isAnnotationPresent(typeof(Deprecated));
+                bool dep = typeof(LuceneVersion).GetField(values[i].ToString()).GetCustomAttributes(typeof(ObsoleteAttribute),
false).Any();
                 if (i + 2 != values.Length)
                 {
-                  Assert.IsTrue(values[i].name() + " should be deprecated", dep);
+                    assertTrue(values[i].ToString() + " should be deprecated", dep);
                 }
                 else
                 {
-                  Assert.IsFalse(values[i].name() + " should not be deprecated", dep);
-                }*/
+                    assertFalse(values[i].ToString() + " should not be deprecated", dep);
+                }
             }
         }
 


Mime
View raw message