lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mhern...@apache.org
Subject [Lucene.Net] svn commit: r1154359 [25/25] - in /incubator/lucene.net/branches/Lucene.Net_4e: ./ build/ build/scripts/ packages/ packages/Gallio.3.2.750/ packages/Gallio.3.2.750/licenses/ packages/Gallio.3.2.750/tools/ packages/Gallio.3.2.750/tools/NCover/ packages/...
Date Fri, 05 Aug 2011 19:21:29 GMT
Added: incubator/lucene.net/branches/Lucene.Net_4e/test/Lucene.Net.Test/Support/WeakDictionaryOfTKeyTValueTest.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_4e/test/Lucene.Net.Test/Support/WeakDictionaryOfTKeyTValueTest.cs?rev=1154359&view=auto
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_4e/test/Lucene.Net.Test/Support/WeakDictionaryOfTKeyTValueTest.cs
(added)
+++ incubator/lucene.net/branches/Lucene.Net_4e/test/Lucene.Net.Test/Support/WeakDictionaryOfTKeyTValueTest.cs
Fri Aug  5 19:21:18 2011
@@ -0,0 +1,300 @@
+// -----------------------------------------------------------------------
+// <copyright file="WeakDictionaryOfTKeyTValueTest.cs" company="Apache">
+//
+//      Licensed to the Apache Software Foundation (ASF) under one or more
+//      contributor license agreements.  See the NOTICE file distributed with
+//      this work for additional information regarding copyright ownership.
+//      The ASF licenses this file to You under the Apache License, Version 2.0
+//      (the "License"); you may not use this file except in compliance with
+//      the License.  You may obtain a copy of the License at
+// 
+//      http://www.apache.org/licenses/LICENSE-2.0
+// 
+//      Unless required by applicable law or agreed to in writing, software
+//      distributed under the License is distributed on an "AS IS" BASIS,
+//      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//      See the License for the specific language governing permissions and
+//      limitations under the License.
+//
+// </copyright>
+// -----------------------------------------------------------------------
+
+
+namespace Lucene.Net.Support
+{
+    using System;
+    using System.Collections.Generic;
+    using System.Linq;
+    using System.Text;
+
+#if NUNIT
+    using NUnit.Framework;
+    using Extensions.NUnit;
+#else 
+    using Gallio.Framework;
+    using MbUnit.Framework;
+#endif
+
+    using Lucene.Net.Util;
+    using Lucene.Net.Internal;
+
+    using Categories = Lucene.Net.TestCategories;
+    
+    [TestFixture]
+    [Category(Categories.Unit)]
+    [Parallelizable]
+    public class WeakDictionaryOfTKeyTValueTest
+    {
+        private readonly TimeSpan defaultTimeSpan = new TimeSpan(0, 0, 15);
+
+        [Test]
+        public void Contructor_WithCapacity()
+        {
+            WeakDictionary<string, ReferenceType> weakDictionary = null;
+
+
+            Assert.DoesNotThrow(() =>
+            {
+                weakDictionary = new WeakDictionary<string, ReferenceType>(2);
+            });
+
+            Assert.AreEqual(this.defaultTimeSpan, weakDictionary.PeriodicRemoval);
+            Assert.AreEqual(2, weakDictionary.InitialCapacity);
+            Assert.AreEqual(0, weakDictionary.Count);
+            Assert.IsNotNull(weakDictionary.Comparer);
+            Assert.IsFalse(weakDictionary.IsReadOnly);
+        }
+
+        [Test]
+        public void Constructor_WithComparer()
+        {
+            WeakDictionary<string, ReferenceType> weakDictionary = null;
+            IEqualityComparer<string> comparer = new String2EqualityComparer();
+
+            Assert.DoesNotThrow(() =>
+            {
+                weakDictionary = new WeakDictionary<string, ReferenceType>(comparer);
+            });
+
+            Assert.AreEqual(this.defaultTimeSpan, weakDictionary.PeriodicRemoval);
+            Assert.AreEqual(0, weakDictionary.InitialCapacity);
+            Assert.AreEqual(0, weakDictionary.Count);
+            Assert.IsNotNull(weakDictionary.Comparer);
+            Assert.AreEqual(comparer, weakDictionary.Comparer);
+        }
+
+        [Test]
+        public void Constructor_WithComparerAndCapacity()
+        {
+
+            WeakDictionary<string, ReferenceType> weakDictionary = null;
+            IEqualityComparer<string> comparer = new String2EqualityComparer();
+            int capacity = 10;
+
+            Assert.DoesNotThrow(() =>
+            {
+                weakDictionary = new WeakDictionary<string, ReferenceType>(capacity,
comparer);
+            });
+
+            Assert.AreEqual(this.defaultTimeSpan, weakDictionary.PeriodicRemoval);
+            Assert.AreEqual(capacity, weakDictionary.InitialCapacity);
+            Assert.AreEqual(0, weakDictionary.Count);
+            Assert.IsNotNull(weakDictionary.Comparer);
+            Assert.AreEqual(comparer, weakDictionary.Comparer);
+        }
+
+    
+        
+
+
+        [Test]
+        public void Add()
+        {
+            var internalDictionary = CreateSmallDictionary();
+            var weakDictionary = new WeakDictionary<string, ReferenceType>();
+
+            foreach (var pair in internalDictionary)
+                weakDictionary.Add(pair.Key, pair.Value);
+
+            Assert.AreEqual(5, weakDictionary.Count);
+
+            var value4 = weakDictionary["four"];
+
+            Assert.AreEqual(internalDictionary["four"], value4);
+
+            var entry6 = new ReferenceType() { Name = "six"};
+
+            weakDictionary.Add("six", entry6);
+
+            var value6 = weakDictionary["six"];
+
+            Assert.AreEqual(6, weakDictionary.Count);
+            Assert.AreEqual(value6, entry6);
+        }
+
+        [Test]
+        public void TryGetValue()
+        {
+            var internalDictionary = CreateSmallDictionary();
+            var weakDictionary = new WeakDictionary<string, ReferenceType>(internalDictionary);
+            ReferenceType value = null;
+
+            bool success = weakDictionary.TryGetValue("one", out value);
+
+            Assert.IsTrue(success, "TryGetValue should have found the key 'one'");
+            Assert.AreEqual("one", value.Name);
+
+            value = null;
+
+            success = weakDictionary.TryGetValue("four", out value);
+
+            Assert.AreEqual("four", value.Name);
+        }
+
+
+        [Test]
+        public void Clear()
+        {
+            var internalDictionary = CreateSmallDictionary();
+            var weakDictionary = new WeakDictionary<string, ReferenceType>(internalDictionary);
+
+            Assert.AreEqual(5, weakDictionary.Count);
+
+            weakDictionary.Clear();
+
+            Assert.AreEqual(0, weakDictionary.Count);
+        }
+
+        [Test]
+        public void Contains()
+        {
+            var internalDictionary = CreateSmallDictionary();
+            var weakDictionary = new WeakDictionary<string, ReferenceType>(internalDictionary);
+
+            bool success = weakDictionary.Contains(
+                                            new KeyValuePair<string, ReferenceType>("one",
+                                                internalDictionary["one"]));
+
+            Assert.IsTrue(success, "Dictionary should have contained the key pair value.");
+        }
+
+        [Test]
+        public void ContainsKey()
+        {
+            var internalDictionary = CreateSmallDictionary();
+            var weakDictionary = new WeakDictionary<string, ReferenceType>(internalDictionary);
+
+            bool success = weakDictionary.ContainsKey("one");
+
+            Assert.IsTrue(success, "The weak dictionary should have contained key 'one'");
+        }
+
+        [Test]
+        public void CopyTo()
+        {
+            var internalDictionary = CreateSmallDictionary();
+            var weakDictionary = new WeakDictionary<string, ReferenceType>(internalDictionary);
+
+             KeyValuePair<string, ReferenceType>[]  emptyArray = new KeyValuePair<string,
ReferenceType>[weakDictionary.Count];
+
+             weakDictionary.CopyTo(emptyArray, 0);
+            
+
+
+             Assert.AreEqual(5, weakDictionary.Count);
+             Assert.AreEqual(weakDictionary.Count, emptyArray.Length);
+             Assert.AreEqual(weakDictionary.First(), emptyArray.First());
+        }
+
+        
+
+        [Test]
+        public void Remove()
+        {
+            var internalDictionary = CreateSmallDictionary();
+            var weakDictionary = new WeakDictionary<string, ReferenceType>(internalDictionary);
+           
+            Assert.AreEqual(5, weakDictionary.Count);
+
+            bool success = weakDictionary.Remove("one");
+
+            Assert.IsTrue(success);
+            Assert.AreEqual(4, weakDictionary.Count);
+        }
+
+
+        [Test]
+        public void RemoveCollectedEntries()
+        {
+            var internalDictionary = CreateSmallDictionary();
+            var weakDictionary = new WeakDictionary<string, ReferenceType>(internalDictionary);
+
+            // Assert State
+            Assert.AreEqual(5, weakDictionary.Count);
+            Assert.IsTrue(weakDictionary.ContainsKey("one"));
+
+            // Assert GC does not collect dictionary reference 
+            // while there is an existing reference.
+            GC.Collect();
+
+            weakDictionary.RemoveCollectedEntries();
+
+           
+            Assert.AreEqual(5, weakDictionary.Count);
+            Assert.IsTrue(weakDictionary.ContainsKey("one"));
+
+            // Assert GC does collect dictionary reference 
+            // when the references are removed.
+            internalDictionary.Clear();
+            internalDictionary = null;
+
+
+            GC.Collect();
+
+            ReferenceType type =null;
+            Assert.IsFalse(weakDictionary.TryGetValue("one", out type));
+            Assert.IsTrue(weakDictionary.ContainsKey("one"));
+
+            weakDictionary.RemoveCollectedEntries();
+
+            Assert.IsFalse(weakDictionary.ContainsKey("one"));
+            Assert.AreEqual(0, weakDictionary.Count);
+        }
+
+
+        #region Helpers
+
+        internal static Dictionary<string, ReferenceType> CreateSmallDictionary()
+        {
+             var internalDictionary = new Dictionary<string, ReferenceType>() {
+                {"one", new ReferenceType() { Name = "one" }},
+                {"two", new ReferenceType() { Name = "two" }},
+                {"three", new ReferenceType() { Name = "three" }},
+                {"four", new ReferenceType() { Name = "four" }},
+                {"five", new ReferenceType() { Name = "one" }},
+            };
+
+            return internalDictionary;
+        }
+
+        
+
+       
+
+        internal class String2EqualityComparer :EqualityComparer<string>
+        {
+
+            public override bool Equals(string x, string y)
+            {
+                return x.Equals(y);
+            }
+
+            public override int GetHashCode(string obj)
+            {
+                return obj.GetHashCode();
+            }
+        }
+
+        #endregion
+    }
+}

Added: incubator/lucene.net/branches/Lucene.Net_4e/test/Lucene.Net.Test/Support/WeakReferenceOfTTest.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_4e/test/Lucene.Net.Test/Support/WeakReferenceOfTTest.cs?rev=1154359&view=auto
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_4e/test/Lucene.Net.Test/Support/WeakReferenceOfTTest.cs
(added)
+++ incubator/lucene.net/branches/Lucene.Net_4e/test/Lucene.Net.Test/Support/WeakReferenceOfTTest.cs
Fri Aug  5 19:21:18 2011
@@ -0,0 +1,110 @@
+// -----------------------------------------------------------------------
+// <copyright file="WeakReferenceOfTTest.cs" company="Apache">
+//
+//      Licensed to the Apache Software Foundation (ASF) under one or more
+//      contributor license agreements.  See the NOTICE file distributed with
+//      this work for additional information regarding copyright ownership.
+//      The ASF licenses this file to You under the Apache License, Version 2.0
+//      (the "License"); you may not use this file except in compliance with
+//      the License.  You may obtain a copy of the License at
+// 
+//      http://www.apache.org/licenses/LICENSE-2.0
+// 
+//      Unless required by applicable law or agreed to in writing, software
+//      distributed under the License is distributed on an "AS IS" BASIS,
+//      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//      See the License for the specific language governing permissions and
+//      limitations under the License.
+//
+// </copyright>
+// -----------------------------------------------------------------------
+
+namespace Lucene.Net.Support
+{
+    using System;
+    using System.Collections.Generic;
+    using System.Linq;
+    using System.Text;
+
+#if NUNIT
+    using NUnit.Framework;
+    using Extensions.NUnit;
+#else 
+    using Gallio.Framework;
+    using MbUnit.Framework;
+#endif
+
+    using Lucene.Net.Internal;
+    using System.Threading;
+    
+    [TestFixture]
+    [Category(TestCategories.Unit)]
+    [Parallelizable]
+    public class WeakReferenceOfTTest
+    {
+
+       
+
+        [Test]
+        public void Constructor()
+        {
+            var instance = Create();
+            WeakReference<ReferenceType> weakReference = null;
+
+            Assert.DoesNotThrow(() =>
+            {
+                weakReference = new WeakReference<ReferenceType>(instance);
+            });
+
+            Assert.AreEqual(instance, weakReference.Target);
+            Assert.IsTrue(weakReference.IsAlive);
+            Assert.IsFalse(weakReference.TrackResurrection);
+        }
+
+        [Test]
+        public void ConstructorWithResurrection()
+        {
+            var instance = Create();
+            WeakReference<ReferenceType> weakReference = null;
+
+            Assert.DoesNotThrow(() =>
+            {
+                weakReference = new WeakReference<ReferenceType>(instance, true);
+            });
+
+            Assert.AreEqual(instance, weakReference.Target);
+            Assert.IsTrue(weakReference.IsAlive);
+            Assert.IsTrue(weakReference.TrackResurrection);
+        }
+
+        [Test]
+        public void GarbageCollection()
+        {
+            // creating the instance inside the method would keep the instance alive,
+            // thus we create this instance in a static method.
+            var instance = Create();
+            WeakReference<ReferenceType> weakReference = null;    
+
+            weakReference = new WeakReference<ReferenceType>(instance);
+
+            Assert.AreEqual(instance, weakReference.Target);
+            Assert.IsTrue(weakReference.IsAlive);
+            
+
+            instance = null;
+
+            GC.Collect();
+            GC.WaitForPendingFinalizers();
+            GC.WaitForFullGCComplete();
+
+            Assert.IsFalse(weakReference.IsAlive);
+            Assert.IsNull(weakReference.Target);            
+        }
+
+        private static ReferenceType Create()
+        {
+            var instance = new ReferenceType() { Name = "test" };
+            return instance;
+        }
+    }
+}

Added: incubator/lucene.net/branches/Lucene.Net_4e/test/Lucene.Net.Test/Util/ArrayUtilTest.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_4e/test/Lucene.Net.Test/Util/ArrayUtilTest.cs?rev=1154359&view=auto
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_4e/test/Lucene.Net.Test/Util/ArrayUtilTest.cs
(added)
+++ incubator/lucene.net/branches/Lucene.Net_4e/test/Lucene.Net.Test/Util/ArrayUtilTest.cs
Fri Aug  5 19:21:18 2011
@@ -0,0 +1,70 @@
+// -----------------------------------------------------------------------
+// <copyright company="Apache" file="ArrayUtilTest.cs" >
+//
+//      Licensed to the Apache Software Foundation (ASF) under one or more
+//      contributor license agreements.  See the NOTICE file distributed with
+//      this work for additional information regarding copyright ownership.
+//      The ASF licenses this file to You under the Apache License, Version 2.0
+//      (the "License"); you may not use this file except in compliance with
+//      the License.  You may obtain a copy of the License at
+// 
+//      http://www.apache.org/licenses/LICENSE-2.0
+// 
+//      Unless required by applicable law or agreed to in writing, software
+//      distributed under the License is distributed on an "AS IS" BASIS,
+//      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//      See the License for the specific language governing permissions and
+//      limitations under the License.
+//
+// </copyright>
+// -----------------------------------------------------------------------
+
+namespace Lucene.Net.Util
+{
+    using System;
+    using System.Collections.Generic;
+    using System.Linq;
+    using System.Text;
+
+#if NUNIT
+    using NUnit.Framework;
+    using Extensions.NUnit;
+#else 
+    using Gallio.Framework;
+    using MbUnit.Framework;
+#endif
+    using Categories = Lucene.Net.TestCategories;
+
+
+    [TestFixture]
+    [Category(Categories.Unit)]
+    [Parallelizable]
+    public class ArrayUtilTest
+    {
+
+        [Test]
+        public void OversizeGrowthAlgorythm()
+        {
+            int currentSize = 0;
+            long copyCost = 0;
+
+            Assert.IsTrue(IntPtr.Size == 4 || IntPtr.Size == 8, "The int ptr size should
be either 8 (64bit) or 4 (32bit)");
+
+            while (currentSize != int.MaxValue)
+            {
+                int nextSize = ArrayUtil.Oversize(1 + currentSize, RamUsageEstimator.NumBytesObjectRef);
+                
+                Assert.IsTrue(nextSize > currentSize);
+                
+                if (currentSize > 0)
+                {
+                    copyCost += currentSize;
+                    double copyCostPerElement = ((double)copyCost / currentSize);
+                    Assert.IsTrue(copyCostPerElement < 10.0, "cost : " + copyCostPerElement);
+                }
+
+                currentSize = nextSize;
+            }
+        }
+    }
+}

Added: incubator/lucene.net/branches/Lucene.Net_4e/test/Lucene.Net.Test/Util/AttributeBaseTest.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_4e/test/Lucene.Net.Test/Util/AttributeBaseTest.cs?rev=1154359&view=auto
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_4e/test/Lucene.Net.Test/Util/AttributeBaseTest.cs
(added)
+++ incubator/lucene.net/branches/Lucene.Net_4e/test/Lucene.Net.Test/Util/AttributeBaseTest.cs
Fri Aug  5 19:21:18 2011
@@ -0,0 +1,127 @@
+// -----------------------------------------------------------------------
+// <copyright file="AttributeBaseTest.cs" company="Apache">
+//
+//      Licensed to the Apache Software Foundation (ASF) under one or more
+//      contributor license agreements.  See the NOTICE file distributed with
+//      this work for additional information regarding copyright ownership.
+//      The ASF licenses this file to You under the Apache License, Version 2.0
+//      (the "License"); you may not use this file except in compliance with
+//      the License.  You may obtain a copy of the License at
+// 
+//      http://www.apache.org/licenses/LICENSE-2.0
+// 
+//      Unless required by applicable law or agreed to in writing, software
+//      distributed under the License is distributed on an "AS IS" BASIS,
+//      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//      See the License for the specific language governing permissions and
+//      limitations under the License.
+//
+// </copyright>
+// -----------------------------------------------------------------------
+
+namespace Lucene.Net.Util
+{
+    using System;
+    using System.Collections.Generic;
+    using System.Linq;
+    using System.Text;
+
+    using Lucene.Net.Analysis.TokenAttributes;
+    using FlagsAttribute = Lucene.Net.Analysis.TokenAttributes.FlagsAttribute;
+
+#if NUNIT
+    using NUnit.Framework;
+    using Extensions.NUnit;
+#else 
+    using Gallio.Framework;
+    using MbUnit.Framework;
+#endif
+
+
+    [TestFixture]
+    [Category(TestCategories.Unit)]
+    [Parallelizable]
+    public class AttributeBaseTest
+    {
+
+        [Test]
+        public void Reflect()
+        {
+            var attribute = new FlagsAttribute();
+            var builder = new StringBuilder();
+
+            attribute.Reflect((t, n, v) =>
+            {
+                builder
+                        .Append(t)
+                        .Append(".")
+                        .Append(n)
+                        .Append("=")
+                        .Append(v);
+            });
+
+            Assert.AreEqual("Lucene.Net.Analysis.TokenAttributes.FlagsAttribute.Flags=0",
builder.ToString());
+        }
+
+        [Test]
+        public void Reflect_WithNotSupportedException()
+        {
+            var twoAttributesInstance = new TwoAttributes();
+            var builder = new StringBuilder();
+
+            Assert.Throws<NotSupportedException>(() =>
+            {
+                twoAttributesInstance.Reflect((t, n, v) =>
+                {
+                    builder
+                            .Append(t)
+                            .Append(".")
+                            .Append(n)
+                            .Append("=")
+                            .Append(v);
+                });
+            });
+        }
+
+        [Test]
+        public void ReflectAsString()
+        {
+            var attribute = new FlagsAttribute();
+            var result =  attribute.ReflectAsString();
+            
+            Assert.AreEqual("Flags=0", result);
+
+            result = attribute.ReflectAsString(true);
+            Assert.AreEqual("FlagsAttribute#Flags=0", result);
+        }
+
+
+        #region Helpers
+
+        public class TwoAttributes : AttributeBase, IFlagsAttribute, ISecondAttribute
+        {
+
+            public int Flags { get; set; }
+                
+
+            public override void Clear()
+            {
+                throw new NotImplementedException();
+            }
+
+            public override void CopyTo(AttributeBase attributeBase)
+            {
+                throw new NotImplementedException();
+            }
+
+           
+        }
+
+        public interface ISecondAttribute : IAttribute
+        {
+
+        }
+
+        #endregion
+    }
+}

Added: incubator/lucene.net/branches/Lucene.Net_4e/test/Lucene.Net.Test/Util/AttributeSourceTest.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_4e/test/Lucene.Net.Test/Util/AttributeSourceTest.cs?rev=1154359&view=auto
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_4e/test/Lucene.Net.Test/Util/AttributeSourceTest.cs
(added)
+++ incubator/lucene.net/branches/Lucene.Net_4e/test/Lucene.Net.Test/Util/AttributeSourceTest.cs
Fri Aug  5 19:21:18 2011
@@ -0,0 +1,77 @@
+// -----------------------------------------------------------------------
+// <copyright file="AttributeSourceTest.cs" company="Apache">
+//
+//      Licensed to the Apache Software Foundation (ASF) under one or more
+//      contributor license agreements.  See the NOTICE file distributed with
+//      this work for additional information regarding copyright ownership.
+//      The ASF licenses this file to You under the Apache License, Version 2.0
+//      (the "License"); you may not use this file except in compliance with
+//      the License.  You may obtain a copy of the License at
+// 
+//      http://www.apache.org/licenses/LICENSE-2.0
+// 
+//      Unless required by applicable law or agreed to in writing, software
+//      distributed under the License is distributed on an "AS IS" BASIS,
+//      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//      See the License for the specific language governing permissions and
+//      limitations under the License.
+//
+// </copyright>
+// -----------------------------------------------------------------------
+
+namespace Lucene.Net.Util
+{
+    using System;
+    using System.Collections.Generic;
+    using System.Linq;
+    using System.Text;
+
+#if NUNIT
+    using NUnit.Framework;
+    using Extensions.NUnit;
+#else 
+    using Gallio.Framework;
+    using MbUnit.Framework;
+#endif
+    using Lucene.Net.Analysis.TokenAttributes;
+  
+    [TestFixture]
+    [Category(TestCategories.Unit)]
+    [Parallelizable]
+    public class AttributeSourceTest
+    {
+
+        [Test]
+        public void GetInterfaces()
+        {
+            var foundInterfaces = AttributeSource.GetAttributeInterfaces(typeof(AttributeBaseTest.TwoAttributes));
+
+            var first = foundInterfaces.First.Value.Target;
+            var second = foundInterfaces.Last.Value.Target;
+
+            Assert.AreEqual(2, foundInterfaces.Count);
+
+            Assert.IsTrue((first.Name == "ISecondAttribute" || first.Name == "IFlagsAttribute"));
+            Assert.IsTrue((second.Name == "ISecondAttribute" || second.Name == "IFlagsAttribute"));
+
+            foundInterfaces = AttributeSource.GetAttributeInterfaces(this.GetType());
+
+            Assert.AreEqual(0, foundInterfaces.Count);
+
+            foundInterfaces = null;
+            foundInterfaces = AttributeSource.GetAttributeInterfaces(typeof(AttributeFacade));
+
+            Assert.AreEqual(0, foundInterfaces.Count);
+        }
+
+
+        #region Helpers
+
+        private class AttributeFacade : IAttribute
+        {
+
+        }
+
+        #endregion
+    }
+}

Added: incubator/lucene.net/branches/Lucene.Net_4e/test/Lucene.Net.Test/packages.config
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_4e/test/Lucene.Net.Test/packages.config?rev=1154359&view=auto
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_4e/test/Lucene.Net.Test/packages.config (added)
+++ incubator/lucene.net/branches/Lucene.Net_4e/test/Lucene.Net.Test/packages.config Fri Aug
 5 19:21:18 2011
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+  <package id="Gallio" version="3.2.601" />
+  <package id="NUnit" version="2.5.10.11092" />
+</packages>
\ No newline at end of file

Added: incubator/lucene.net/branches/Lucene.Net_4e/test/Lucene.Net.TestFramework.Test/Lucene.Net.TestFramework.Test.csproj
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_4e/test/Lucene.Net.TestFramework.Test/Lucene.Net.TestFramework.Test.csproj?rev=1154359&view=auto
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_4e/test/Lucene.Net.TestFramework.Test/Lucene.Net.TestFramework.Test.csproj
(added)
+++ incubator/lucene.net/branches/Lucene.Net_4e/test/Lucene.Net.TestFramework.Test/Lucene.Net.TestFramework.Test.csproj
Fri Aug  5 19:21:18 2011
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>8.0.30703</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{26D22898-1DDE-461E-A191-B33AFAC3343A}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>Lucene.Net.TestFramework.Test</RootNamespace>
+    <AssemblyName>Lucene.Net.TestFramework.Test</AssemblyName>
+    <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and
uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>
\ No newline at end of file

Added: incubator/lucene.net/branches/Lucene.Net_4e/test/Lucene.Net.TestFramework.Test/Properties/AssemblyInfo.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_4e/test/Lucene.Net.TestFramework.Test/Properties/AssemblyInfo.cs?rev=1154359&view=auto
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_4e/test/Lucene.Net.TestFramework.Test/Properties/AssemblyInfo.cs
(added)
+++ incubator/lucene.net/branches/Lucene.Net_4e/test/Lucene.Net.TestFramework.Test/Properties/AssemblyInfo.cs
Fri Aug  5 19:21:18 2011
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Lucene.Net.TestFramework.Tests")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct("Lucene.Net.TestFramework.Tests")]
+[assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("54e47a33-3ff2-448d-91f7-d215694c9629")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers 
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

Added: incubator/lucene.net/branches/Lucene.Net_4e/test/Lucene.Net.TestFramework.Test/Settings.StyleCop
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_4e/test/Lucene.Net.TestFramework.Test/Settings.StyleCop?rev=1154359&view=auto
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_4e/test/Lucene.Net.TestFramework.Test/Settings.StyleCop
(added)
+++ incubator/lucene.net/branches/Lucene.Net_4e/test/Lucene.Net.TestFramework.Test/Settings.StyleCop
Fri Aug  5 19:21:18 2011
@@ -0,0 +1 @@
+<StyleCopSettings Version="105" />
\ No newline at end of file

Added: incubator/lucene.net/branches/Lucene.Net_4e/tools/ItemTemplates/Apache Class.zip
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_4e/tools/ItemTemplates/Apache%20Class.zip?rev=1154359&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/lucene.net/branches/Lucene.Net_4e/tools/ItemTemplates/Apache Class.zip
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/lucene.net/branches/Lucene.Net_4e/tools/ItemTemplates/Apache Enum.zip
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_4e/tools/ItemTemplates/Apache%20Enum.zip?rev=1154359&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/lucene.net/branches/Lucene.Net_4e/tools/ItemTemplates/Apache Enum.zip
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/lucene.net/branches/Lucene.Net_4e/tools/ItemTemplates/Apache Interface.zip
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_4e/tools/ItemTemplates/Apache%20Interface.zip?rev=1154359&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/lucene.net/branches/Lucene.Net_4e/tools/ItemTemplates/Apache Interface.zip
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/lucene.net/branches/Lucene.Net_4e/tools/ItemTemplates/Apache Lucene Unit
Test.zip
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_4e/tools/ItemTemplates/Apache%20Lucene%20Unit%20Test.zip?rev=1154359&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/lucene.net/branches/Lucene.Net_4e/tools/ItemTemplates/Apache Lucene
Unit Test.zip
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream



Mime
View raw message