Skip to content

Commit

Permalink
Adds Apache License, Version 2.0 headers.
Browse files Browse the repository at this point in the history
  • Loading branch information
tpierrain committed Feb 18, 2013
1 parent 827cad3 commit 395e37a
Show file tree
Hide file tree
Showing 12 changed files with 166 additions and 24 deletions.
6 changes: 3 additions & 3 deletions NFluent.Tests/Person.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
internal class Person
{
public string Name { get; set; }

public int Age { get; set; }

public Nationality Nationality { get; set; }

// ReSharper disable UnusedMember.Local
// ReSharper disable UnusedMember.Local
private string PrivateHesitation
// ReSharper restore UnusedMember.Local
{
// ReSharper restore UnusedMember.Local
get
{
return "Kamoulox !";
Expand Down
16 changes: 16 additions & 0 deletions NFluent.sln.DotSettings
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeStyle/FileHeader/FileHeaderText/@EntryValue">// --------------------------------------------------------------------------------------------------------------------&#xD;
// &lt;copyright file="$FILENAME$" company=""&gt;&#xD;
// Copyright $CURRENT_YEAR$ Thomas PIERRAIN&#xD;
// Licensed under the Apache License, Version 2.0 (the "License");&#xD;
// you may not use this file except in compliance with the License.&#xD;
// You may obtain a copy of the License at&#xD;
// http://www.apache.org/licenses/LICENSE-2.0&#xD;
// Unless required by applicable law or agreed to in writing, software&#xD;
// distributed under the License is distributed on an "AS IS" BASIS,&#xD;
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&#xD;
// See the License for the specific language governing permissions and&#xD;
// limitations under the License.&#xD;
// &lt;/copyright&gt;&#xD;
// --------------------------------------------------------------------------------------------------------------------&#xD;
</s:String></wpf:ResourceDictionary>
16 changes: 15 additions & 1 deletion NFluent/Assert.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
namespace NFluent
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="Assert.cs" company="">
// Copyright 2013 Thomas PIERRAIN
// Licensed 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 NFluent
{
/// <summary>
/// Contains a collection of static methods that implement the only assertions you need to be fluent (if your favorite .NET unit test framework doesn't provide it).
Expand Down
16 changes: 15 additions & 1 deletion NFluent/ContainsExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
namespace NFluent
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ContainsExtensions.cs" company="">
// Copyright 2013 Thomas PIERRAIN
// Licensed 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 NFluent
{
using System.Collections;
using System.Collections.Generic;
Expand Down
23 changes: 16 additions & 7 deletions NFluent/EnumerableExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
namespace NFluent
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="EnumerableExtensions.cs" company="">
// Copyright 2013 Thomas PIERRAIN
// Licensed 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 NFluent
{
using System.Collections;
using System.Linq;
Expand All @@ -22,12 +36,7 @@ public static class EnumerableExtensions
/// <exception cref="FluentAssertionException">The enumerable has not the expected size.</exception>
public static bool HasSize(this IEnumerable enumerable, long expectedSize)
{
long itemsCount = 0;

foreach (var item in enumerable)
{
itemsCount++;
}
long itemsCount = enumerable.Cast<object>().LongCount();

if (expectedSize != itemsCount)
{
Expand Down
16 changes: 15 additions & 1 deletion NFluent/EqualityExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
namespace NFluent
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="EqualityExtensions.cs" company="">
// Copyright 2013 Thomas PIERRAIN
// Licensed 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 NFluent
{
/// <summary>
/// Extension methods for exploiting enumerable content in a fluent manner (i.e. with auto completion support and in an english readable way).
Expand Down
16 changes: 15 additions & 1 deletion NFluent/ExtensionsCommonHelpers.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
namespace NFluent
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ExtensionsCommonHelpers.cs" company="">
// Copyright 2013 Thomas PIERRAIN
// Licensed 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 NFluent
{
/// <summary>
/// Common helper methods for the NFluent extension methods.
Expand Down
16 changes: 15 additions & 1 deletion NFluent/FluentAssertionException.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
namespace NFluent
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="FluentAssertionException.cs" company="">
// Copyright 2013 Thomas PIERRAIN
// Licensed 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 NFluent
{
using System;

Expand Down
16 changes: 15 additions & 1 deletion NFluent/IsInstanceExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
namespace NFluent
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="IsInstanceExtensions.cs" company="">
// Copyright 2013 Thomas PIERRAIN
// Licensed 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 NFluent
{
using System;

Expand Down
18 changes: 16 additions & 2 deletions NFluent/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
using System.Reflection;
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="AssemblyInfo.cs" company="">
// Copyright 2013 Thomas PIERRAIN
// Licensed 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>
// --------------------------------------------------------------------------------------------------------------------
using System.Reflection;
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("NFluent")]
[assembly: AssemblyDescription("NFluent provides some helpers for Easy Software Testing in .NET. NFluent is highly inspired of the awesome FEST Fluent assertion/reflection Java library (http://fest.easytesting.org/)")]
[assembly: AssemblyDescription("Smooth your .NET TDD experience with NFluent! NFluent provides some extension methods for a fluent .NET TDD experience based on simple Assert.That(bool condition) statements. NFluent aims your tests to be fluent to write (with auto completion support) but also fluent to read (i.e. as close as possible to plain english expression).NFluent is highly inspired by the awesome Java FEST Fluent assertion/reflection library (http://fest.easytesting.org/)")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Thomas PIERRAIN ([email protected])")]
[assembly: AssemblyProduct("NFluent")]
Expand Down
16 changes: 15 additions & 1 deletion NFluent/PropertiesExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
namespace NFluent
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="PropertiesExtensions.cs" company="">
// Copyright 2013 Thomas PIERRAIN
// Licensed 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 NFluent
{
using System;
using System.Collections;
Expand Down
15 changes: 10 additions & 5 deletions NFluent/Settings.StyleCop
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@
<Analyzers>
<Analyzer AnalyzerId="StyleCop.CSharp.DocumentationRules">
<Rules>
<Rule Name="ElementsMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">True</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PropertyDocumentationMustHaveValue">
<RuleSettings>
<BooleanProperty Name="Enabled">True</BooleanProperty>
Expand All @@ -32,6 +27,16 @@
<BooleanProperty Name="Enabled">True</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileMustHaveHeader">
<RuleSettings>
<BooleanProperty Name="Enabled">True</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderMustHaveValidCompanyText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
Expand Down

0 comments on commit 395e37a

Please sign in to comment.