Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 0D63A200C0E for ; Wed, 1 Feb 2017 11:22:03 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 0C2A0160B43; Wed, 1 Feb 2017 10:22:03 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id F30C5160B77 for ; Wed, 1 Feb 2017 11:22:00 +0100 (CET) Received: (qmail 37029 invoked by uid 500); 1 Feb 2017 10:21:59 -0000 Mailing-List: contact commits-help@lucenenet.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: lucene-net-dev@lucenenet.apache.org Delivered-To: mailing list commits@lucenenet.apache.org Received: (qmail 36474 invoked by uid 99); 1 Feb 2017 10:21:59 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Feb 2017 10:21:59 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 539A4F2DDA; Wed, 1 Feb 2017 10:21:59 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: nightowl888@apache.org To: commits@lucenenet.apache.org Date: Wed, 01 Feb 2017 10:22:17 -0000 Message-Id: In-Reply-To: <83b1fecda87947ea985b9d48fe1bcd9f@git.apache.org> References: <83b1fecda87947ea985b9d48fe1bcd9f@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [20/28] lucenenet git commit: Lucene.Net.Tests.Expressions: added API consistency tests archived-at: Wed, 01 Feb 2017 10:22:03 -0000 Lucene.Net.Tests.Expressions: added API consistency tests Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/247f50ce Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/247f50ce Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/247f50ce Branch: refs/heads/api-work Commit: 247f50ceeb7a13b8c19bdbb73ce37971eaf8c8a1 Parents: 3a4c23e Author: Shad Storhaug Authored: Wed Feb 1 16:33:15 2017 +0700 Committer: Shad Storhaug Committed: Wed Feb 1 16:33:15 2017 +0700 ---------------------------------------------------------------------- .../Lucene.Net.Tests.Expressions.csproj | 1 + .../TestApiConsistency.cs | 120 +++++++++++++++++++ 2 files changed, 121 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucenenet/blob/247f50ce/src/Lucene.Net.Tests.Expressions/Lucene.Net.Tests.Expressions.csproj ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Tests.Expressions/Lucene.Net.Tests.Expressions.csproj b/src/Lucene.Net.Tests.Expressions/Lucene.Net.Tests.Expressions.csproj index 2fc503d..677289b 100644 --- a/src/Lucene.Net.Tests.Expressions/Lucene.Net.Tests.Expressions.csproj +++ b/src/Lucene.Net.Tests.Expressions/Lucene.Net.Tests.Expressions.csproj @@ -44,6 +44,7 @@ + http://git-wip-us.apache.org/repos/asf/lucenenet/blob/247f50ce/src/Lucene.Net.Tests.Expressions/TestApiConsistency.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Tests.Expressions/TestApiConsistency.cs b/src/Lucene.Net.Tests.Expressions/TestApiConsistency.cs new file mode 100644 index 0000000..06ad62a --- /dev/null +++ b/src/Lucene.Net.Tests.Expressions/TestApiConsistency.cs @@ -0,0 +1,120 @@ +using Lucene.Net.Attributes; +using Lucene.Net.Util; +using NUnit.Framework; +using System; + +namespace Lucene.Net.Tests.Expressions +{ + /// + /// LUCENENET specific tests for ensuring API conventions are followed + /// + public class TestApiConsistency : ApiScanTestBase + { + [Test, LuceneNetSpecific] + [TestCase(typeof(Lucene.Net.Expressions.Bindings))] + public override void TestProtectedFieldNames(Type typeFromTargetAssembly) + { + base.TestProtectedFieldNames(typeFromTargetAssembly); + } + + [Test, LuceneNetSpecific] + [TestCase(typeof(Lucene.Net.Expressions.Bindings))] + public override void TestPrivateFieldNames(Type typeFromTargetAssembly) + { + base.TestPrivateFieldNames(typeFromTargetAssembly); + } + + [Test, LuceneNetSpecific] + [TestCase(typeof(Lucene.Net.Expressions.Bindings))] + public override void TestPublicFields(Type typeFromTargetAssembly) + { + base.TestPublicFields(typeFromTargetAssembly); + } + + [Test, LuceneNetSpecific] + [TestCase(typeof(Lucene.Net.Expressions.Bindings))] + public override void TestMethodParameterNames(Type typeFromTargetAssembly) + { + base.TestMethodParameterNames(typeFromTargetAssembly); + } + + [Test, LuceneNetSpecific] + [TestCase(typeof(Lucene.Net.Expressions.Bindings))] + public override void TestInterfaceNames(Type typeFromTargetAssembly) + { + base.TestInterfaceNames(typeFromTargetAssembly); + } + + [Test, LuceneNetSpecific] + [TestCase(typeof(Lucene.Net.Expressions.Bindings))] + public override void TestClassNames(Type typeFromTargetAssembly) + { + base.TestClassNames(typeFromTargetAssembly); + } + + [Test, LuceneNetSpecific] + [TestCase(typeof(Lucene.Net.Expressions.Bindings))] + public override void TestForPropertiesWithNoGetter(Type typeFromTargetAssembly) + { + base.TestForPropertiesWithNoGetter(typeFromTargetAssembly); + } + + [Test, LuceneNetSpecific] + [TestCase(typeof(Lucene.Net.Expressions.Bindings))] + public override void TestForPropertiesThatReturnArray(Type typeFromTargetAssembly) + { + base.TestForPropertiesThatReturnArray(typeFromTargetAssembly); + } + + [Test, LuceneNetSpecific] + [TestCase(typeof(Lucene.Net.Expressions.Bindings))] + public override void TestForMethodsThatReturnWritableArray(Type typeFromTargetAssembly) + { + base.TestForMethodsThatReturnWritableArray(typeFromTargetAssembly); + } + + [Test, LuceneNetSpecific] + [TestCase(typeof(Lucene.Net.Expressions.Bindings))] + public override void TestForPublicMembersContainingComparer(Type typeFromTargetAssembly) + { + base.TestForPublicMembersContainingComparer(typeFromTargetAssembly); + } + + [Test, LuceneNetSpecific] + [TestCase(typeof(Lucene.Net.Expressions.Bindings))] + public override void TestForPublicMembersNamedSize(Type typeFromTargetAssembly) + { + base.TestForPublicMembersNamedSize(typeFromTargetAssembly); + } + + [Test, LuceneNetSpecific] + [TestCase(typeof(Lucene.Net.Expressions.Bindings))] + public override void TestForPublicMembersContainingNonNetNumeric(Type typeFromTargetAssembly) + { + base.TestForPublicMembersContainingNonNetNumeric(typeFromTargetAssembly); + } + + [Test, LuceneNetSpecific] + [TestCase(typeof(Lucene.Net.Expressions.Bindings))] + public override void TestForPublicMembersWithNullableEnum(Type typeFromTargetAssembly) + { + base.TestForPublicMembersWithNullableEnum(typeFromTargetAssembly); + } + + // LUCENENET NOTE: This test is only for identifying members who were changed from + // ICollection, IList or ISet to IEnumerable during the port (that should be changed back) + //[Test, LuceneNetSpecific] + //[TestCase(typeof(Lucene.Net.Expressions.Bindings))] + //public override void TestForMembersAcceptingOrReturningIEnumerable(Type typeFromTargetAssembly) + //{ + // base.TestForMembersAcceptingOrReturningIEnumerable(typeFromTargetAssembly); + //} + + [Test, LuceneNetSpecific] + [TestCase(typeof(Lucene.Net.Expressions.Bindings))] + public override void TestForMembersAcceptingOrReturningListOrDictionary(Type typeFromTargetAssembly) + { + base.TestForMembersAcceptingOrReturningListOrDictionary(typeFromTargetAssembly); + } + } +}