8000 Consolidate namespace and file location by vbreuss · Pull Request #2449 · fluentassertions/fluentassertions · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Src/FluentAssertions/AssertionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
using FluentAssertions.Common;
using FluentAssertions.Numeric;
using FluentAssertions.Primitives;
using FluentAssertions.Reflection;
using FluentAssertions.Specialized;
using FluentAssertions.Streams;
using FluentAssertions.Types;
Expand Down
3 changes: 0 additions & 3 deletions Src/FluentAssertions/FluentAssertions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@
<When Condition="'$(TargetFramework)' == 'net6.0'">
<ItemGroup>
<Compile Remove="Common/NullConfigurationStore.cs" />
<Compile Remove="StringBuilderExtensions.cs" />
<Compile Remove="SystemExtensions.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.Configuration.ConfigurationManager" Version="4.4.0" />
Expand All @@ -66,7 +64,6 @@
<ItemGroup>
<Compile Remove="Common/AppSettingsConfigurationStore.cs" />
<Compile Remove="Common/ConfigurationStoreExceptionInterceptor.cs" />
<Compile Remove="SystemExtensions.cs" />
</ItemGroup>
</When>
<When Condition="'$(TargetFramework)' == 'netstandard2.0'">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
using System.Collections.Generic;
#if NET47 || NETSTANDARD2_0 || NETSTANDARD2_1

using System.Collections.Generic;

// ReSharper disable once CheckNamespace
namespace System.Text;

/// <summary>
Expand All @@ -13,8 +16,8 @@ internal static class StringBuilderExtensions
public static StringBuilder AppendLine(this StringBuilder stringBuilder, IFormatProvider _, string value) =>
stringBuilder.AppendLine(value);

#if NET47 || NETSTANDARD2_0
public static StringBuilder AppendJoin<T>(this StringBuilder stringBuilder, string separator, IEnumerable<T> values) =>
stringBuilder.Append(string.Join(separator, values));
#endif
}

#endif
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
namespace System;
#if NET47 || NETSTANDARD2_0

// ReSharper disable once CheckNamespace
namespace System;

internal static class SystemExtensions
{
Expand All @@ -21,3 +24,5 @@ public static bool Contains(this string str, char value, StringComparison compar
public static bool StartsWith(this string str, char value) =>
str.Length != 0 && str[0] == value;
}

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using FluentAssertions.Execution;
using FluentAssertions.Primitives;

namespace FluentAssertions.Reflection;
namespace FluentAssertions.Types;

/// <summary>
/// Contains a number of methods to assert that an <see cref="Assembly"/> is in the expected state.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ namespace FluentAssertions
public static FluentAssertions.Streams.BufferedStreamAssertions Should(this System.IO.BufferedStream actualValue) { }
public static FluentAssertions.Streams.StreamAssertions Should(this System.IO.Stream actualValue) { }
public static FluentAssertions.Primitives.HttpResponseMessageAssertions Should(this System.Net.Http.HttpResponseMessage actualValue) { }
public static FluentAssertions.Reflection.AssemblyAssertions Should(this System.Reflection.Assembly assembly) { }
public static FluentAssertions.Types.AssemblyAssertions Should(this System.Reflection.Assembly assembly) { }
public static FluentAssertions.Types.ConstructorInfoAssertions Should(this System.Reflection.ConstructorInfo constructorInfo) { }
public static FluentAssertions.Types.MethodInfoAssertions Should(this System.Reflection.MethodInfo methodInfo) { }
public static FluentAssertions.Types.PropertyInfoAssertions Should(this System.Reflection.PropertyInfo propertyInfo) { }
Expand Down Expand Up @@ -2080,19 +2080,6 @@ namespace FluentAssertions.Primitives
LessThan = 4,
}
}
namespace FluentAssertions.Reflection
{
public class AssemblyAssertions : FluentAssertions.Primitives.ReferenceTypeAssertions<System.Reflection.Assembly, FluentAssertions.Reflection.AssemblyAssertions>
{
public AssemblyAssertions(System.Reflection.Assembly assembly) { }
protected override string Identifier { get; }
public FluentAssertions.AndConstraint<FluentAssertions.Reflection.AssemblyAssertions> BeSignedWithPublicKey(string publicKey, string because = "", params object[] becauseArgs) { }
public FluentAssertions.AndConstraint<FluentAssertions.Reflection.AssemblyAssertions> BeUnsigned(string because = "", params object[] becauseArgs) { }
public FluentAssertions.AndWhichConstraint<FluentAssertions.Reflection.AssemblyAssertions, System.Type> DefineType(string @namespace, string name, string because = "", params object[] becauseArgs) { }
public FluentAssertions.AndConstraint<FluentAssertions.Reflection.AssemblyAssertions> NotReference(System.Reflection.Assembly assembly, string because = "", params object[] becauseArgs) { }
public FluentAssertions.AndConstraint<FluentAssertions.Reflection.AssemblyAssertions> Reference(System.Reflection.Assembly assembly, string because = "", params object[] becauseArgs) { }
}
}
namespace FluentAssertions.Specialized
{
public class ActionAssertions : FluentAssertions.Specialized.DelegateAssertions<System.Action, FluentAssertions.Specialized.ActionAssertions>
Expand Down Expand Up @@ -2267,6 +2254,16 @@ namespace FluentAssertions.Types
{
public static FluentAssertions.Types.TypeSelector From(System.Reflection.Assembly assembly) { }
}
public class AssemblyAssertions : FluentAssertions.Primitives.ReferenceTypeAssertions<System.Reflection.Assembly, FluentAssertions.Types.AssemblyAssertions>
{
public AssemblyAssertions(System.Reflection.Assembly assembly) { }
protected override string Identifier { get; }
public FluentAssertions.AndConstraint<FluentAssertions.Types.AssemblyAssertions> BeSignedWithPublicKey(string publicKey, string because = "", params object[] becauseArgs) { }
D285 public FluentAssertions.AndConstraint<FluentAssertions.Types.AssemblyAssertions> BeUnsigned(string because = "", params object[] becauseArgs) { }
public FluentAssertions.AndWhichConstraint<FluentAssertions.Types.AssemblyAssertions, System.Type> DefineType(string @namespace, string name, string because = "", params object[] becauseArgs) { }
public FluentAssertions.AndConstraint<FluentAssertions.Types.AssemblyAssertions> NotReference(System.Reflection.Assembly assembly, string because = "", params object[] becauseArgs) { }
public FluentAssertions.AndConstraint<FluentAssertions.Types.AssemblyAssertions> Reference(System.Reflection.Assembly assembly, string because = "", params object[] becauseArgs) { }
}
public class ConstructorInfoAssertions : FluentAssertions.Types.MethodBaseAssertions<System.Reflection.ConstructorInfo, FluentAssertions.Types.ConstructorInfoAssertions>
{
public ConstructorInfoAssertions(System.Reflection.ConstructorInfo constructorInfo) { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ namespace FluentAssertions
public static FluentAssertions.Streams.BufferedStreamAssertions Should(this System.IO.BufferedStream actualValue) { }
public static FluentAssertions.Streams.StreamAssertions Should(this System.IO.Stream actualValue) { }
public static FluentAssertions.Primitives.HttpResponseMessageAssertions Should(this System.Net.Http.HttpResponseMessage actualValue) { }
public static FluentAssertions.Reflection.AssemblyAssertions Should(this System.Reflection.Assembly assembly) { }
public static FluentAssertions.Types.AssemblyAssertions Should(this System.Reflection.Assembly assembly) { }
public static FluentAssertions.Types.ConstructorInfoAssertions Should(this System.Reflection.ConstructorInfo constructorInfo) { }
public static FluentAssertions.Types.MethodInfoAssertions Should(this System.Reflection.MethodInfo methodInfo) { }
public static FluentAssertions.Types.PropertyInfoAssertions Should(this System.Reflection.PropertyInfo propertyInfo) { }
Expand Down Expand Up @@ -2201,19 +2201,6 @@ namespace FluentAssertions.Primitives
LessThan = 4,
}
}
namespace FluentAssertions.Reflection
{
public class AssemblyAssertions : FluentAssertions.Primitives.ReferenceTypeAssertions<System.Reflection.Assembly, FluentAssertions.Reflection.AssemblyAssertions>
{
public AssemblyAssertions(System.Reflection.Assembly assembly) { }
protected override string Identifier { get; }
public FluentAssertions.AndConstraint<FluentAssertions.Reflection.AssemblyAssertions> BeSignedWithPublicKey(string publicKey, string because = "", params object[] becauseArgs) { }
public FluentAssertions.AndConstraint<FluentAssertions.Reflection.AssemblyAssertions> BeUnsigned(string because = "", params object[] becauseArgs) { }
public FluentAssertions.AndWhichConstraint<FluentAssertions.Reflection.AssemblyAssertions, System.Type> DefineType(string @namespace, string name, string because = "", params object[] becauseArgs) { }
public FluentAssertions.AndConstraint<FluentAssertions.Reflection.AssemblyAssertions> NotReference(System.Reflection.Assembly assembly, string because = "", params object[] becauseArgs) { }
public FluentAssertions.AndConstraint<FluentAssertions.Reflection.AssemblyAssertions> Reference(System.Reflection.Assembly assembly, string because = "", params object[] becauseArgs) { }
}
}
namespace FluentAssertions.Specialized
{
public class ActionAssertions : FluentAssertions.Specialized.DelegateAssertions<System.Action, FluentAssertions.Specialized.ActionAssertions>
Expand Down Expand Up @@ -2397,6 +2384,16 @@ namespace FluentAssertions.Types
{
public static FluentAssertions.Types.TypeSelector From(System.Reflection.Assembly assembly) { }
}
public class AssemblyAssertions : FluentAssertions.Primitives.ReferenceTypeAssertions<System.Reflection.Assembly, FluentAssertions.Types.AssemblyAssertions>
{
public AssemblyAssertions(System.Reflection.Assembly assembly) { }
protected override string Identifier { get; }
public FluentAssertions.AndConstraint<FluentAssertions.Types.AssemblyAssertions> BeSignedWithPublicKey(string publicKey, 393B string because = "", params object[] becauseArgs) { }
public FluentAssertions.AndConstraint<FluentAssertions.Types.AssemblyAssertions> BeUnsigned(string because = "", params object[] becauseArgs) { }
public FluentAssertions.AndWhichConstraint<FluentAssertions.Types.AssemblyAssertions, System.Type> DefineType(string @namespace, string name, string because = "", params object[] becauseArgs) { }
public FluentAssertions.AndConstraint<FluentAssertions.Types.AssemblyAssertions> NotReference(System.Reflection.Assembly assembly, string because = "", params object[] becauseArgs) { }
public FluentAssertions.AndConstraint<FluentAssertions.Types.AssemblyAssertions> Reference(System.Reflection.Assembly assembly, string because = "", params object[] becauseArgs) { }
}
public class ConstructorInfoAssertions : FluentAssertions.Types.MethodBaseAssertions<System.Reflection.ConstructorInfo, FluentAssertions.Types.ConstructorInfoAssertions>
{
public ConstructorInfoAssertions(System.Reflection.ConstructorInfo constructorInfo) { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ namespace FluentAssertions
public static FluentAssertions.Streams.BufferedStreamAssertions Should(this System.IO.BufferedStream actualValue) { }
public static FluentAssertions.Streams.StreamAssertions Should(this System.IO.Stream actualValue) { }
public static FluentAssertions.Primitives.HttpResponseMessageAssertions Should(this System.Net.Http.HttpResponseMessage actualValue) { }
public static FluentAssertions.Reflection.AssemblyAssertions Should(this System.Reflection.Assembly assembly) { }
public static FluentAssertions.Types.AssemblyAssertions Should(this System.Reflection.Assembly assembly) { }
public static FluentAssertions.Types.ConstructorInfoAssertions Should(this System.Reflection.ConstructorInfo constructorInfo) { }
public static FluentAssertions.Types.MethodInfoAssertions Should(this System.Reflection.MethodInfo methodInfo) { }
public static FluentAssertions.Types.PropertyInfoAssertions Should(this System.Reflection.PropertyInfo propertyInfo) { }
Expand Down Expand Up @@ -2031,19 +2031,6 @@ namespace FluentAssertions.Primitives
LessThan = 4,
}
}
namespace FluentAssertions.Reflection
{
public class AssemblyAssertions : FluentAssertions.Primitives.ReferenceTypeAssertions<System.Reflection.Assembly, FluentAssertions.Reflection.AssemblyAssertions>
{
public AssemblyAssertions(System.Reflection.Assembly assembly) { }
protected override string Identifier { get; }
public FluentAssertions.AndConstraint<FluentAssertions.Reflection.AssemblyAssertions> BeSignedWithPublicKey(string publicKey, string because = "", params object[] becauseArgs) { }
public FluentAssertions.AndConstraint<FluentAssertions.Reflection.AssemblyAssertions> BeUnsigned(string because = "", params object[] becauseArgs) { }
public FluentAssertions.AndWhichConstraint<FluentAssertions.Reflection.AssemblyAssertions, System.Type> DefineType(string @namespace, string name, string because = "", params object[] becauseArgs) { }
public FluentAssertions.AndConstraint<FluentAssertions.Reflection.AssemblyAssertions> NotReference(System.Reflection.Assembly assembly, string because = "", params object[] becauseArgs) { }
public FluentAssertions.AndConstraint<FluentAssertions.Reflection.AssemblyAssertions> Reference(System.Reflection.Assembly assembly, string because = "", params object[] becauseArgs) { }
}
}
namespace FluentAssertions.Specialized
{
public class ActionAssertions : FluentAssertions.Specialized.DelegateAssertions<System.Action, FluentAssertions.Specialized.ActionAssertions>
Expand Down Expand Up @@ -2218,6 +2205,16 @@ namespace FluentAssertions.Types
{
public static FluentAssertions.Types.TypeSelector From(System.Reflection.Assembly assembly) { }
}
public class AssemblyAssertions : FluentAssertions.Primitives.ReferenceTypeAssertions<System.Reflection.Assembly, FluentAssertions.Types.AssemblyAssertions>
{
public AssemblyAssertions(System.Reflection.Assembly assembly) { }
protected override string Identifier { get; }
public FluentAssertions.AndConstraint<FluentAssertions.Types.AssemblyAssertions> BeSignedWithPublicKey(string publicKey, string because = "", params object[] becauseArgs) { }
public FluentAssertions.AndConstraint<FluentAssertions.Types.AssemblyAssertions> BeUnsigned(string because = "", params object[] becauseArgs) { }
public FluentAssertions.AndWhichConstraint<FluentAssertions.Types.AssemblyAssertions, System.Type> DefineType(string @namespace, string name, string because = "", params object[] becauseArgs) { }
public FluentAssertions.AndConstraint<FluentAssertions.Types.AssemblyAssertions> NotReference(System.Reflection.Assembly assembly, string because = "", params object[] becauseArgs) { }
public FluentAssertions.AndConstraint<FluentAssertions.Types.AssemblyAssertions> Reference(System.Reflection.Assembly assembly, string because = "", params object[] becauseArgs) { }
}
public class ConstructorInfoAssertions : FluentAssertions.Types.MethodBaseAssertions<System.Reflection.ConstructorInfo, FluentAssertions.Types.ConstructorInfoAssertions>
{
public ConstructorInfoAssertions(System.Reflection.ConstructorInfo constructorInfo) { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ namespace FluentAssertions
public static FluentAssertions.Streams.BufferedStreamAssertions Should(this System.IO.BufferedStream actualValue) { }
public static FluentAssertions.Streams.StreamAssertions Should(this System.IO.Stream actualValue) { }
public static FluentAssertions.Primitives.HttpResponseMessageAssertions Should(this System.Net.Http.HttpResponseMessage actualValue) { }
public static FluentAssertions.Reflection.AssemblyAssertions Should(this System.Reflection.Assembly assembly) { }
public static FluentAssertions.Types.AssemblyAssertions Should(this System.Reflection.Assembly assembly) { }
public static FluentAssertions.Types.ConstructorInfoAssertions Should(this System.Reflection.ConstructorInfo constructorInfo) { }
public static FluentAssertions.Types.MethodInfoAssertions Should(this System.Reflection.MethodInfo methodInfo) { }
public static FluentAssertions.Types.PropertyInfoAssertions Should(this System.Reflection.PropertyInfo propertyInfo) { }
Expand Down Expand Up @@ -2080,19 +2080,6 @@ namespace FluentAssertions.Primitives
LessThan = 4,
}
}
namespace FluentAssertions.Reflection
{
public class AssemblyAssertions : FluentAssertions.Primitives.ReferenceTypeAssertions<System.Reflection.Assembly, FluentAssertions.Reflection.AssemblyAssertions>
{
public AssemblyAssertions(System.Reflection.Assembly assembly) { }
protected override string Identifier { get; }
public FluentAssertions.AndConstraint<FluentAssertions.Reflection.AssemblyAssertions> BeSignedWithPublicKey(string publicKey, string because = "", params object[] becauseArgs) { }
public FluentAssertions.AndConstraint<FluentAssertions.Reflection.AssemblyAssertions> BeUnsigned(string because = "", params object[] becauseArgs) { }
public FluentAssertions.AndWhichConstraint<FluentAssertions.Reflection.AssemblyAssertions, System.Type> DefineType(string @namespace, string name, string because = "", params object[] becauseArgs) { }
public FluentAssertions.AndConstraint<FluentAssertions.Reflection.AssemblyAssertions> NotReference(System.Reflection.Assembly assembly, string because = "", params object[] becauseArgs) { }
public FluentAssertions.AndConstraint<FluentAssertions.Reflection.AssemblyAssertions> Reference(System.Reflection.Assembly assembly, string because = "", params object[] becauseArgs) { }
}
}
namespace FluentAssertions.Specialized
{
public class ActionAssertions : FluentAssertions.Specialized.DelegateAssertions<System.Action, FluentAssertions.Specialized.ActionAssertions>
Expand Down Expand Up @@ -2269,6 +2256,16 @@ namespace FluentAssertions.Types
{
public static FluentAssertions.Types.TypeSelector From(System.Reflection.Assembly assembly) { }
}
public class AssemblyAssertions : FluentAssertions.Primitives.ReferenceTypeAssertions<System.Reflection.Assembly, FluentAssertions.Types.AssemblyAssertions>
{
public AssemblyAssertions(System.Reflection.Assembly assembly) { }
protected override string Identifier { get; }
public FluentAssertions.AndConstraint<FluentAssertions.Types.AssemblyAssertions> BeSignedWithPublicKey(string publicKey, string because = "", params object[] becauseArgs) { }
public FluentAssertions.AndConstraint<FluentAssertions.Types.AssemblyAssertions> BeUnsigned(string because = "", params object[] becauseArgs) { }
public FluentAssertions.AndWhichConstraint<FluentAssertions.Types.AssemblyAssertions, System.Type> DefineType(string @namespace, string name, string because = "", params object[] becauseArgs) { }
public FluentAssertions.AndConstraint<FluentAssertions.Types.AssemblyAssertions> NotReference(System.Reflection.Assembly assembly, string because = "", params object[] becauseArgs) { }
public FluentAssertions.AndConstraint<FluentAssertions.Types.AssemblyAssertions> Reference(System.Reflection.Assembly assembly, string because = "", params object[] becauseArgs) { }
}
public class ConstructorInfoAssertions : FluentAssertions.Types.MethodBaseAssertions<System.Reflection.ConstructorInfo, FluentAssertions.Types.ConstructorInfoAssertions>
{
public ConstructorInfoAssertions(System.Reflection.ConstructorInfo constructorInfo) { }
Expand Down
3 changes: 3 additions & 0 deletions qodana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ exclude:
- name: ConvertToLambdaExpression
- name: SwitchExpressionHandlesSomeKnownEnumValuesWithExceptionInDefault
- name: UnusedMemberInSuper.Global
- name: CheckNamespace
paths:
- Src\FluentAssertions\Polyfill
0