mirror of
https://github.com/oliverbooth/X10D
synced 2024-11-10 03:45:41 +00:00
Compare commits
No commits in common. "d17d94a8c1818f0ff18c35a355c2bb4e38c7ea7f" and "a14fe4ca6443056c75ae844d2903a97064ee7ffc" have entirely different histories.
d17d94a8c1
...
a14fe4ca64
@ -1,67 +0,0 @@
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<LangVersion>11.0</LangVersion>
|
||||
<Optimize>true</Optimize>
|
||||
<ImplicitUsings>true</ImplicitUsings>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<EnableNETAnalyzers>true</EnableNETAnalyzers>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<VersionPrefix>4.0.0</VersionPrefix>
|
||||
<Authors>Oliver Booth</Authors>
|
||||
<Nullable>enable</Nullable>
|
||||
<NeutralLanguage>en</NeutralLanguage>
|
||||
<RepositoryUrl>https://github.com/oliverbooth/X10D</RepositoryUrl>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<Description>Extension methods on crack.</Description>
|
||||
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
|
||||
<PackageIcon>branding_Icon.png</PackageIcon>
|
||||
<PackageIconUrl/>
|
||||
<PackageTags>dotnet extension-methods</PackageTags>
|
||||
<PackageReadmeFile>README.md</PackageReadmeFile>
|
||||
<PackageReleaseNotes>$([System.IO.File]::ReadAllText("$(SolutionDir)/CHANGELOG.md"))</PackageReleaseNotes>
|
||||
<CodeAnalysisTreatWarningsAsErrors>true</CodeAnalysisTreatWarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
|
||||
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(VersionSuffix)' != '' And '$(BuildNumber)' == ''">
|
||||
<Version>$(VersionPrefix)-$(VersionSuffix)</Version>
|
||||
<AssemblyVersion>$(VersionPrefix).0</AssemblyVersion>
|
||||
<FileVersion>$(VersionPrefix).0</FileVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(VersionSuffix)' != '' And '$(BuildNumber)' != ''">
|
||||
<Version>$(VersionPrefix)-$(VersionSuffix).$(BuildNumber)</Version>
|
||||
<AssemblyVersion>$(VersionPrefix).$(BuildNumber)</AssemblyVersion>
|
||||
<FileVersion>$(VersionPrefix).$(BuildNumber)</FileVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(VersionSuffix)' == ''">
|
||||
<Version>$(VersionPrefix)</Version>
|
||||
<AssemblyVersion>$(VersionPrefix).0</AssemblyVersion>
|
||||
<FileVersion>$(VersionPrefix).0</FileVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="..\branding_Icon.png">
|
||||
<Pack>True</Pack>
|
||||
<PackagePath/>
|
||||
</None>
|
||||
<None Include="..\LICENSE.md">
|
||||
<Pack>True</Pack>
|
||||
<PackagePath/>
|
||||
</None>
|
||||
<None Include="..\README.md">
|
||||
<Pack>True</Pack>
|
||||
<PackagePath/>
|
||||
</None>
|
||||
<None Include="..\CHANGELOG.md">
|
||||
<Pack>True</Pack>
|
||||
<PackagePath/>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -2,11 +2,69 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net7.0;net6.0;netstandard2.1</TargetFrameworks>
|
||||
<LangVersion>11.0</LangVersion>
|
||||
<Optimize>true</Optimize>
|
||||
<ImplicitUsings>true</ImplicitUsings>
|
||||
<Authors>Oliver Booth</Authors>
|
||||
<NeutralLanguage>en</NeutralLanguage>
|
||||
<RepositoryUrl>https://github.com/oliverbooth/X10D</RepositoryUrl>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<Description>Extension methods on crack.</Description>
|
||||
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
|
||||
<PackageIcon>branding_Icon.png</PackageIcon>
|
||||
<PackageIconUrl/>
|
||||
<PackageTags>dotnet extension-methods</PackageTags>
|
||||
<PackageReleaseNotes>$([System.IO.File]::ReadAllText("$(MSBuildProjectDirectory)/../CHANGELOG.md"))</PackageReleaseNotes>
|
||||
<CodeAnalysisTreatWarningsAsErrors>true</CodeAnalysisTreatWarningsAsErrors>
|
||||
<VersionPrefix>4.0.0</VersionPrefix>
|
||||
<Nullable>enable</Nullable>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<ExcludeFromCodeCoverage>true</ExcludeFromCodeCoverage>
|
||||
<EnableNETAnalyzers>true</EnableNETAnalyzers>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
|
||||
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(VersionSuffix)' != '' And '$(BuildNumber)' == ''">
|
||||
<Version>$(VersionPrefix)-$(VersionSuffix)</Version>
|
||||
<AssemblyVersion>$(VersionPrefix).0</AssemblyVersion>
|
||||
<FileVersion>$(VersionPrefix).0</FileVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(VersionSuffix)' != '' And '$(BuildNumber)' != ''">
|
||||
<Version>$(VersionPrefix)-$(VersionSuffix).$(BuildNumber)</Version>
|
||||
<AssemblyVersion>$(VersionPrefix).$(BuildNumber)</AssemblyVersion>
|
||||
<FileVersion>$(VersionPrefix).$(BuildNumber)</FileVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(VersionSuffix)' == ''">
|
||||
<Version>$(VersionPrefix)</Version>
|
||||
<AssemblyVersion>$(VersionPrefix).0</AssemblyVersion>
|
||||
<FileVersion>$(VersionPrefix).0</FileVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="DSharpPlus" Version="4.3.0" PrivateAssets="All"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="..\branding_Icon.png">
|
||||
<Pack>True</Pack>
|
||||
<PackagePath/>
|
||||
</None>
|
||||
<None Include="..\LICENSE.md">
|
||||
<Pack>True</Pack>
|
||||
<PackagePath/>
|
||||
</None>
|
||||
<None Include="..\CHANGELOG.md">
|
||||
<Pack>True</Pack>
|
||||
<PackagePath/>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
@ -2,10 +2,68 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net7.0;net6.0;netstandard2.1</TargetFrameworks>
|
||||
<LangVersion>11.0</LangVersion>
|
||||
<Optimize>true</Optimize>
|
||||
<ImplicitUsings>true</ImplicitUsings>
|
||||
<Authors>Oliver Booth</Authors>
|
||||
<NeutralLanguage>en</NeutralLanguage>
|
||||
<RepositoryUrl>https://github.com/oliverbooth/X10D</RepositoryUrl>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<Description>Extension methods on crack.</Description>
|
||||
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
|
||||
<PackageIcon>branding_Icon.png</PackageIcon>
|
||||
<PackageIconUrl/>
|
||||
<PackageTags>dotnet extension-methods</PackageTags>
|
||||
<PackageReleaseNotes>$([System.IO.File]::ReadAllText("$(MSBuildProjectDirectory)/../CHANGELOG.md"))</PackageReleaseNotes>
|
||||
<CodeAnalysisTreatWarningsAsErrors>true</CodeAnalysisTreatWarningsAsErrors>
|
||||
<VersionPrefix>4.0.0</VersionPrefix>
|
||||
<Nullable>enable</Nullable>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<EnableNETAnalyzers>true</EnableNETAnalyzers>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
|
||||
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(VersionSuffix)' != '' And '$(BuildNumber)' == ''">
|
||||
<Version>$(VersionPrefix)-$(VersionSuffix)</Version>
|
||||
<AssemblyVersion>$(VersionPrefix).0</AssemblyVersion>
|
||||
<FileVersion>$(VersionPrefix).0</FileVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(VersionSuffix)' != '' And '$(BuildNumber)' != ''">
|
||||
<Version>$(VersionPrefix)-$(VersionSuffix).$(BuildNumber)</Version>
|
||||
<AssemblyVersion>$(VersionPrefix).$(BuildNumber)</AssemblyVersion>
|
||||
<FileVersion>$(VersionPrefix).$(BuildNumber)</FileVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(VersionSuffix)' == ''">
|
||||
<Version>$(VersionPrefix)</Version>
|
||||
<AssemblyVersion>$(VersionPrefix).0</AssemblyVersion>
|
||||
<FileVersion>$(VersionPrefix).0</FileVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="7.0.0"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="..\branding_Icon.png">
|
||||
<Pack>True</Pack>
|
||||
<PackagePath/>
|
||||
</None>
|
||||
<None Include="..\LICENSE.md">
|
||||
<Pack>True</Pack>
|
||||
<PackagePath/>
|
||||
</None>
|
||||
<None Include="..\CHANGELOG.md">
|
||||
<Pack>True</Pack>
|
||||
<PackagePath/>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
@ -2,10 +2,12 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net7.0;net6.0;netcoreapp3.1</TargetFrameworks>
|
||||
<LangVersion>11.0</LangVersion>
|
||||
<IsPackable>false</IsPackable>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>true</ImplicitUsings>
|
||||
<CoverletOutputFormat>json,cobertura</CoverletOutputFormat>
|
||||
<CollectCoverage>true</CollectCoverage>
|
||||
<CodeAnalysisTreatWarningsAsErrors>false</CodeAnalysisTreatWarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
|
||||
|
@ -1 +1 @@
|
||||
[assembly: CLSCompliant(false)]
|
||||
[assembly: CLSCompliant(true)]
|
||||
|
@ -3,10 +3,10 @@ using X10D.Collections;
|
||||
|
||||
namespace X10D.Tests.Collections;
|
||||
|
||||
internal static partial class ArrayTests
|
||||
public partial class ArrayTests
|
||||
{
|
||||
[TestFixture]
|
||||
internal class AsReadOnlyTests
|
||||
public class AsReadOnlyTests
|
||||
{
|
||||
[Test]
|
||||
public void AsReadOnly_ShouldReturnReadOnlyCollection_WhenArrayIsNotNull()
|
||||
|
@ -3,7 +3,7 @@ using X10D.Collections;
|
||||
|
||||
namespace X10D.Tests.Collections;
|
||||
|
||||
internal static partial class ArrayTests
|
||||
public partial class ArrayTests
|
||||
{
|
||||
[TestFixture]
|
||||
public class ClearTests
|
||||
|
@ -3,6 +3,6 @@
|
||||
namespace X10D.Tests.Collections;
|
||||
|
||||
[TestFixture]
|
||||
internal static partial class ArrayTests
|
||||
public partial class ArrayTests
|
||||
{
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ using X10D.Collections;
|
||||
namespace X10D.Tests.Collections;
|
||||
|
||||
[TestFixture]
|
||||
internal class BoolListTests
|
||||
public class BoolListTests
|
||||
{
|
||||
[Test]
|
||||
public void PackByte_Should_Pack_Correctly()
|
||||
|
@ -5,7 +5,7 @@ using X10D.Collections;
|
||||
namespace X10D.Tests.Collections;
|
||||
|
||||
[TestFixture]
|
||||
internal class ByteTests
|
||||
public class ByteTests
|
||||
{
|
||||
[Test]
|
||||
public void Unpack_ShouldUnpackToArrayCorrectly()
|
||||
|
@ -5,7 +5,7 @@ using X10D.Collections;
|
||||
|
||||
namespace X10D.Tests.Collections;
|
||||
|
||||
internal partial class CollectionTests
|
||||
public partial class CollectionTests
|
||||
{
|
||||
[TestFixture]
|
||||
public class ClearAndDisposeAllTests
|
||||
|
@ -5,7 +5,7 @@ using X10D.Collections;
|
||||
|
||||
namespace X10D.Tests.Collections;
|
||||
|
||||
internal partial class CollectionTests
|
||||
public partial class CollectionTests
|
||||
{
|
||||
[TestFixture]
|
||||
public class ClearAndDisposeAllAsyncTests
|
||||
|
@ -3,6 +3,6 @@
|
||||
namespace X10D.Tests.Collections;
|
||||
|
||||
[TestFixture]
|
||||
internal partial class CollectionTests
|
||||
public partial class CollectionTests
|
||||
{
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ using X10D.Collections;
|
||||
namespace X10D.Tests.Collections;
|
||||
|
||||
[TestFixture]
|
||||
internal class DictionaryTests
|
||||
public class DictionaryTests
|
||||
{
|
||||
[Test]
|
||||
public void AddOrUpdate_ShouldAddNewKey_IfNotExists_GivenConcreteDictionary()
|
||||
|
@ -4,7 +4,7 @@ using X10D.Collections;
|
||||
|
||||
namespace X10D.Tests.Collections;
|
||||
|
||||
internal partial class EnumerableTests
|
||||
public partial class EnumerableTests
|
||||
{
|
||||
[TestFixture]
|
||||
public class DisposeAllTests
|
||||
|
@ -4,7 +4,7 @@ using X10D.Collections;
|
||||
|
||||
namespace X10D.Tests.Collections;
|
||||
|
||||
internal partial class EnumerableTests
|
||||
public partial class EnumerableTests
|
||||
{
|
||||
[TestFixture]
|
||||
public class DisposeAllAsyncTests
|
||||
|
@ -5,7 +5,7 @@ using X10D.Core;
|
||||
namespace X10D.Tests.Collections;
|
||||
|
||||
[TestFixture]
|
||||
internal partial class EnumerableTests
|
||||
public partial class EnumerableTests
|
||||
{
|
||||
[Test]
|
||||
public void CountWhereNot_ShouldReturnCorrectCount_GivenSequence()
|
||||
|
@ -5,7 +5,7 @@ using X10D.Collections;
|
||||
namespace X10D.Tests.Collections;
|
||||
|
||||
[TestFixture]
|
||||
internal class Int16Tests
|
||||
public class Int16Tests
|
||||
{
|
||||
[Test]
|
||||
public void Unpack_ShouldUnpackToArrayCorrectly()
|
||||
|
@ -5,7 +5,7 @@ using X10D.Collections;
|
||||
namespace X10D.Tests.Collections;
|
||||
|
||||
[TestFixture]
|
||||
internal class Int32Tests
|
||||
public class Int32Tests
|
||||
{
|
||||
[Test]
|
||||
public void Unpack_ShouldUnpackToArrayCorrectly()
|
||||
|
@ -1,12 +1,11 @@
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using NUnit.Framework;
|
||||
using X10D.Collections;
|
||||
|
||||
namespace X10D.Tests.Collections;
|
||||
|
||||
[TestFixture]
|
||||
internal class Int64Tests
|
||||
public class Int64Tests
|
||||
{
|
||||
[Test]
|
||||
public void UnpackBits_ShouldUnpackToArrayCorrectly()
|
||||
@ -30,7 +29,7 @@ internal class Int64Tests
|
||||
|
||||
for (var index = 8; index < 64; index++)
|
||||
{
|
||||
Assert.That(bits[index], Is.False, index.ToString(CultureInfo.InvariantCulture));
|
||||
Assert.That(bits[index], Is.False, index.ToString());
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -54,7 +53,7 @@ internal class Int64Tests
|
||||
|
||||
for (var index = 8; index < 64; index++)
|
||||
{
|
||||
Assert.That(bits[index], Is.False, index.ToString(CultureInfo.InvariantCulture));
|
||||
Assert.That(bits[index], Is.False, index.ToString());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -4,9 +4,10 @@ using X10D.Collections;
|
||||
namespace X10D.Tests.Collections;
|
||||
|
||||
[TestFixture]
|
||||
internal class ListTests
|
||||
public class ListTests
|
||||
{
|
||||
[Test]
|
||||
[CLSCompliant(false)]
|
||||
[Test]
|
||||
[TestCase(1)]
|
||||
[TestCase(1, 2, 3)]
|
||||
[TestCase(1, 2, 3, 4, 5)]
|
||||
@ -25,7 +26,8 @@ internal class ListTests
|
||||
CollectionAssert.AreEqual(all42, list);
|
||||
}
|
||||
|
||||
[Test]
|
||||
[CLSCompliant(false)]
|
||||
[Test]
|
||||
[TestCase(1)]
|
||||
[TestCase(1, 2, 3)]
|
||||
[TestCase(1, 2, 3, 4, 5)]
|
||||
|
@ -4,7 +4,7 @@ using X10D.Collections;
|
||||
namespace X10D.Tests.Collections;
|
||||
|
||||
[TestFixture]
|
||||
internal class SpanTest
|
||||
public class SpanTest
|
||||
{
|
||||
[Test]
|
||||
public void Count_ShouldReturn0_GivenEmptySpan()
|
||||
|
@ -4,7 +4,7 @@ using X10D.Core;
|
||||
namespace X10D.Tests.Core;
|
||||
|
||||
[TestFixture]
|
||||
internal class CoreTests
|
||||
public class CoreTests
|
||||
{
|
||||
[Test]
|
||||
[TestCase(1)]
|
||||
|
@ -4,7 +4,7 @@ using X10D.Core;
|
||||
namespace X10D.Tests.Core;
|
||||
|
||||
[TestFixture]
|
||||
internal class EnumTests
|
||||
public class EnumTests
|
||||
{
|
||||
// Microsoft wrongfully decided to have Sunday be 0, Monday be 1, etc.
|
||||
// I personally hate this, Sunday is not the first day of the week.
|
||||
|
@ -7,7 +7,7 @@ using X10D.Core;
|
||||
namespace X10D.Tests.Core;
|
||||
|
||||
[TestFixture]
|
||||
internal class IntrinsicTests
|
||||
public class IntrinsicTests
|
||||
{
|
||||
[Test]
|
||||
public void CorrectBoolean_ShouldReturnExpectedVector64Result_GivenInputVector()
|
||||
|
@ -4,7 +4,7 @@ using X10D.Core;
|
||||
namespace X10D.Tests.Core;
|
||||
|
||||
[TestFixture]
|
||||
internal class NullableTests
|
||||
public class NullableTests
|
||||
{
|
||||
[Test]
|
||||
public void TryGetValue_ShouldBeTrue_GivenValue()
|
||||
|
@ -5,7 +5,7 @@ using X10D.Core;
|
||||
namespace X10D.Tests.Core;
|
||||
|
||||
[TestFixture]
|
||||
internal class RandomTests
|
||||
public class RandomTests
|
||||
{
|
||||
[Test]
|
||||
public void NextBoolean_ShouldBeFalse_GivenSeed1234()
|
||||
|
@ -8,7 +8,7 @@ using X10D.Core;
|
||||
namespace X10D.Tests.Core;
|
||||
|
||||
[TestFixture]
|
||||
internal class SpanTest
|
||||
public class SpanTest
|
||||
{
|
||||
[Test]
|
||||
public void Contains_ShouldReturnFalse_GivenReadOnlySpanWithNoMatchingElements_UsingByteEnum()
|
||||
|
@ -5,7 +5,7 @@ using X10D.Drawing;
|
||||
namespace X10D.Tests.Drawing;
|
||||
|
||||
[TestFixture]
|
||||
internal class CircleFTests
|
||||
public class CircleFTests
|
||||
{
|
||||
[Test]
|
||||
public void Area_ShouldBePiRadiusRadius_GivenUnitCircle()
|
||||
|
@ -4,7 +4,7 @@ using X10D.Drawing;
|
||||
namespace X10D.Tests.Drawing;
|
||||
|
||||
[TestFixture]
|
||||
internal class CircleTests
|
||||
public class CircleTests
|
||||
{
|
||||
[Test]
|
||||
public void Area_ShouldBePiRadiusRadius_GivenUnitCircle()
|
||||
|
@ -5,7 +5,7 @@ using X10D.Drawing;
|
||||
namespace X10D.Tests.Drawing;
|
||||
|
||||
[TestFixture]
|
||||
internal class ColorTests
|
||||
public class ColorTests
|
||||
{
|
||||
private static readonly Color Black = Color.FromArgb(0, 0, 0);
|
||||
private static readonly Color White = Color.FromArgb(255, 255, 255);
|
||||
|
@ -5,7 +5,7 @@ using X10D.Drawing;
|
||||
namespace X10D.Tests.Drawing;
|
||||
|
||||
[TestFixture]
|
||||
internal class CuboidTests
|
||||
public class CuboidTests
|
||||
{
|
||||
[Test]
|
||||
public void Corners_ShouldBeCorrect_GivenCubeOfSize1()
|
||||
|
@ -6,7 +6,7 @@ using X10D.Drawing;
|
||||
namespace X10D.Tests.Drawing;
|
||||
|
||||
[TestFixture]
|
||||
internal class EllipseFTests
|
||||
public class EllipseFTests
|
||||
{
|
||||
[Test]
|
||||
public void Area_ShouldBePiRadiusRadius_GivenUnitEllipse()
|
||||
|
@ -5,7 +5,7 @@ using X10D.Drawing;
|
||||
namespace X10D.Tests.Drawing;
|
||||
|
||||
[TestFixture]
|
||||
internal class EllipseTests
|
||||
public class EllipseTests
|
||||
{
|
||||
[Test]
|
||||
public void Area_ShouldBePiRadiusRadius_GivenUnitEllipse()
|
||||
|
@ -6,7 +6,7 @@ using X10D.Drawing;
|
||||
namespace X10D.Tests.Drawing;
|
||||
|
||||
[TestFixture]
|
||||
internal class Line3DTests
|
||||
public class Line3DTests
|
||||
{
|
||||
[Test]
|
||||
public void CompareTo_ShouldBeNegativeOne_GivenEmptyAndOne()
|
||||
|
@ -5,7 +5,7 @@ using X10D.Drawing;
|
||||
namespace X10D.Tests.Drawing;
|
||||
|
||||
[TestFixture]
|
||||
internal class LineFTests
|
||||
public class LineFTests
|
||||
{
|
||||
[Test]
|
||||
public void CompareTo_ShouldBeNegativeOne_GivenEmptyAndOne()
|
||||
|
@ -4,7 +4,7 @@ using X10D.Drawing;
|
||||
namespace X10D.Tests.Drawing;
|
||||
|
||||
[TestFixture]
|
||||
internal class LineTests
|
||||
public class LineTests
|
||||
{
|
||||
[Test]
|
||||
public void CompareTo_ShouldBeNegativeOne_GivenEmptyAndOne()
|
||||
|
@ -8,7 +8,7 @@ using X10D.Drawing;
|
||||
namespace X10D.Tests.Drawing;
|
||||
|
||||
[TestFixture]
|
||||
internal class PointFTests
|
||||
public class PointFTests
|
||||
{
|
||||
[Test]
|
||||
public void IsOnLine_ShouldReturnTrue_GivenPointOnLine()
|
||||
|
@ -5,7 +5,7 @@ using X10D.Drawing;
|
||||
namespace X10D.Tests.Drawing;
|
||||
|
||||
[TestFixture]
|
||||
internal class PointTests
|
||||
public class PointTests
|
||||
{
|
||||
[Test]
|
||||
public void IsOnLine_ShouldReturnTrue_GivenPointOnLine()
|
||||
|
@ -6,7 +6,7 @@ using X10D.Drawing;
|
||||
namespace X10D.Tests.Drawing;
|
||||
|
||||
[TestFixture]
|
||||
internal class PolygonFTests
|
||||
public class PolygonFTests
|
||||
{
|
||||
[Test]
|
||||
public void AddVertices_ShouldAddVertices()
|
||||
|
@ -5,7 +5,7 @@ using X10D.Drawing;
|
||||
namespace X10D.Tests.Drawing;
|
||||
|
||||
[TestFixture]
|
||||
internal class PolygonTests
|
||||
public class PolygonTests
|
||||
{
|
||||
[Test]
|
||||
public void AddVertices_ShouldAddVertices()
|
||||
|
@ -5,7 +5,7 @@ using X10D.Drawing;
|
||||
namespace X10D.Tests.Drawing;
|
||||
|
||||
[TestFixture]
|
||||
internal class PolyhedronTests
|
||||
public class PolyhedronTests
|
||||
{
|
||||
[Test]
|
||||
public void AddVertices_ShouldAddVertices()
|
||||
|
@ -5,7 +5,7 @@ using X10D.Drawing;
|
||||
namespace X10D.Tests.Drawing;
|
||||
|
||||
[TestFixture]
|
||||
internal class RandomTests
|
||||
public class RandomTests
|
||||
{
|
||||
[Test]
|
||||
public void NextColorArgb_ShouldReturn331515e5_GivenSeed1234()
|
||||
|
@ -5,7 +5,7 @@ using X10D.Drawing;
|
||||
namespace X10D.Tests.Drawing;
|
||||
|
||||
[TestFixture]
|
||||
internal class SizeTests
|
||||
public class SizeTests
|
||||
{
|
||||
[Test]
|
||||
public void ToPoint_ShouldReturnPoint_WithEquivalentMembers()
|
||||
|
@ -4,7 +4,7 @@ using X10D.Drawing;
|
||||
namespace X10D.Tests.Drawing;
|
||||
|
||||
[TestFixture]
|
||||
internal class SphereTests
|
||||
public class SphereTests
|
||||
{
|
||||
[Test]
|
||||
public void Circumference_ShouldBe2PiRadius_GivenUnitCircle()
|
||||
|
@ -6,7 +6,7 @@ using X10D.Hosting.DependencyInjection;
|
||||
namespace X10D.Tests.Hosting;
|
||||
|
||||
[TestFixture]
|
||||
internal class ServiceCollectionTests
|
||||
public class ServiceCollectionTests
|
||||
{
|
||||
[Test]
|
||||
public void AddHostedSingleton_ShouldRegisterServiceAsSingletonAndAsHostedService()
|
||||
|
@ -4,7 +4,7 @@ using X10D.IO;
|
||||
namespace X10D.Tests.IO;
|
||||
|
||||
[TestFixture]
|
||||
internal class BooleanTests
|
||||
public class BooleanTests
|
||||
{
|
||||
[Test]
|
||||
public void GetBytes_ReturnsArrayContaining1()
|
||||
|
@ -4,7 +4,7 @@ using X10D.IO;
|
||||
namespace X10D.Tests.IO;
|
||||
|
||||
[TestFixture]
|
||||
internal class ByteTests
|
||||
public class ByteTests
|
||||
{
|
||||
[Test]
|
||||
public void GetBytes_ReturnsArrayContainingItself()
|
||||
|
@ -4,7 +4,7 @@ using X10D.IO;
|
||||
namespace X10D.Tests.IO;
|
||||
|
||||
[TestFixture]
|
||||
internal class DirectoryInfoTests
|
||||
public class DirectoryInfoTests
|
||||
{
|
||||
[Test]
|
||||
public void Clear_ShouldClear_GivenValidDirectory()
|
||||
|
@ -4,7 +4,7 @@ using X10D.IO;
|
||||
namespace X10D.Tests.IO;
|
||||
|
||||
[TestFixture]
|
||||
internal class DoubleTests
|
||||
public class DoubleTests
|
||||
{
|
||||
[Test]
|
||||
public void GetBytes_ReturnsCorrectValue()
|
||||
|
@ -5,7 +5,7 @@ using X10D.IO;
|
||||
namespace X10D.Tests.IO;
|
||||
|
||||
[TestFixture]
|
||||
internal class FileInfoTests
|
||||
public class FileInfoTests
|
||||
{
|
||||
[Test]
|
||||
public void GetHashSha1ShouldBeCorrect()
|
||||
|
@ -4,7 +4,7 @@ using X10D.IO;
|
||||
namespace X10D.Tests.IO;
|
||||
|
||||
[TestFixture]
|
||||
internal class Int16Tests
|
||||
public class Int16Tests
|
||||
{
|
||||
[Test]
|
||||
public void GetBytes_ReturnsCorrectValue()
|
||||
|
@ -4,7 +4,7 @@ using X10D.IO;
|
||||
namespace X10D.Tests.IO;
|
||||
|
||||
[TestFixture]
|
||||
internal class Int32Tests
|
||||
public class Int32Tests
|
||||
{
|
||||
[Test]
|
||||
public void GetBytes_ReturnsCorrectValue()
|
||||
|
@ -4,7 +4,7 @@ using X10D.IO;
|
||||
namespace X10D.Tests.IO;
|
||||
|
||||
[TestFixture]
|
||||
internal class Int64Tests
|
||||
public class Int64Tests
|
||||
{
|
||||
[Test]
|
||||
public void GetBytes_ReturnsCorrectValue()
|
||||
|
@ -5,7 +5,7 @@ using X10D.IO;
|
||||
namespace X10D.Tests.IO;
|
||||
|
||||
[TestFixture]
|
||||
internal class ListOfByteTests
|
||||
public class ListOfByteTests
|
||||
{
|
||||
[Test]
|
||||
public void AsString_ShouldReturnBytes_GivenBytes()
|
||||
|
@ -4,7 +4,8 @@ using X10D.IO;
|
||||
namespace X10D.Tests.IO;
|
||||
|
||||
[TestFixture]
|
||||
internal class SByteTests
|
||||
[CLSCompliant(false)]
|
||||
public class SByteTests
|
||||
{
|
||||
[Test]
|
||||
public void GetBytes_ReturnsArrayContainingItself()
|
||||
|
@ -4,7 +4,7 @@ using X10D.IO;
|
||||
namespace X10D.Tests.IO;
|
||||
|
||||
[TestFixture]
|
||||
internal class SingleTests
|
||||
public class SingleTests
|
||||
{
|
||||
[Test]
|
||||
public void GetBytes_ReturnsCorrectValue()
|
||||
|
@ -3,7 +3,7 @@ using X10D.IO;
|
||||
|
||||
namespace X10D.Tests.IO;
|
||||
|
||||
internal partial class StreamTests
|
||||
public partial class StreamTests
|
||||
{
|
||||
[Test]
|
||||
public void ReadDecimal_ShouldThrowArgumentException_GivenNonReadableStream()
|
||||
|
@ -3,7 +3,7 @@ using X10D.IO;
|
||||
|
||||
namespace X10D.Tests.IO;
|
||||
|
||||
internal partial class StreamTests
|
||||
public partial class StreamTests
|
||||
{
|
||||
[Test]
|
||||
public void ReadDouble_ShouldThrowArgumentException_GivenNonReadableStream()
|
||||
|
@ -3,7 +3,7 @@ using X10D.IO;
|
||||
|
||||
namespace X10D.Tests.IO;
|
||||
|
||||
internal partial class StreamTests
|
||||
public partial class StreamTests
|
||||
{
|
||||
[Test]
|
||||
public void ReadInt16_ShouldThrowArgumentException_GivenNonReadableStream()
|
||||
|
@ -3,7 +3,7 @@ using X10D.IO;
|
||||
|
||||
namespace X10D.Tests.IO;
|
||||
|
||||
internal partial class StreamTests
|
||||
public partial class StreamTests
|
||||
{
|
||||
[Test]
|
||||
public void ReadInt32_ShouldThrowArgumentException_GivenNonReadableStream()
|
||||
|
@ -3,7 +3,7 @@ using X10D.IO;
|
||||
|
||||
namespace X10D.Tests.IO;
|
||||
|
||||
internal partial class StreamTests
|
||||
public partial class StreamTests
|
||||
{
|
||||
[Test]
|
||||
public void ReadInt64_ShouldThrowArgumentException_GivenNonReadableStream()
|
||||
|
@ -3,7 +3,7 @@ using X10D.IO;
|
||||
|
||||
namespace X10D.Tests.IO;
|
||||
|
||||
internal partial class StreamTests
|
||||
public partial class StreamTests
|
||||
{
|
||||
[Test]
|
||||
public void ReadSingle_ShouldThrowArgumentException_GivenNonReadableStream()
|
||||
|
@ -3,10 +3,11 @@ using X10D.IO;
|
||||
|
||||
namespace X10D.Tests.IO;
|
||||
|
||||
internal partial class StreamTests
|
||||
public partial class StreamTests
|
||||
{
|
||||
[Test]
|
||||
public void ReadUInt16_ShouldThrowArgumentException_GivenNonReadableStream()
|
||||
[CLSCompliant(false)]
|
||||
public void ReadUInt16_ShouldThrowArgumentException_GivenNonReadableStream()
|
||||
{
|
||||
Stream stream = new DummyStream();
|
||||
Assert.Throws<ArgumentException>(() => stream.ReadUInt16());
|
||||
@ -15,7 +16,8 @@ internal partial class StreamTests
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ReadUInt16_ShouldThrowArgumentNullException_GivenNullStream()
|
||||
[CLSCompliant(false)]
|
||||
public void ReadUInt16_ShouldThrowArgumentNullException_GivenNullStream()
|
||||
{
|
||||
Stream stream = null!;
|
||||
Assert.Throws<ArgumentNullException>(() => stream.ReadUInt16());
|
||||
@ -24,7 +26,8 @@ internal partial class StreamTests
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ReadUInt16_ShouldThrowArgumentOutOfRangeException_GivenInvalidEndiannessValue()
|
||||
[CLSCompliant(false)]
|
||||
public void ReadUInt16_ShouldThrowArgumentOutOfRangeException_GivenInvalidEndiannessValue()
|
||||
{
|
||||
// we don't need to enclose this stream in a using declaration, since disposing a
|
||||
// null stream is meaningless. NullStream.Dispose actually does nothing, anyway.
|
||||
@ -36,7 +39,8 @@ internal partial class StreamTests
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ReadUInt16_ShouldReadBigEndian_GivenBigEndian()
|
||||
[CLSCompliant(false)]
|
||||
public void ReadUInt16_ShouldReadBigEndian_GivenBigEndian()
|
||||
{
|
||||
using var stream = new MemoryStream();
|
||||
ReadOnlySpan<byte> bytes = stackalloc byte[] {0x01, 0xA4};
|
||||
@ -51,7 +55,8 @@ internal partial class StreamTests
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ReadUInt16_ShouldReadLittleEndian_GivenLittleEndian()
|
||||
[CLSCompliant(false)]
|
||||
public void ReadUInt16_ShouldReadLittleEndian_GivenLittleEndian()
|
||||
{
|
||||
using var stream = new MemoryStream();
|
||||
ReadOnlySpan<byte> bytes = stackalloc byte[] {0xA4, 0x01};
|
||||
|
@ -3,10 +3,11 @@ using X10D.IO;
|
||||
|
||||
namespace X10D.Tests.IO;
|
||||
|
||||
internal partial class StreamTests
|
||||
public partial class StreamTests
|
||||
{
|
||||
[Test]
|
||||
public void ReadUInt32_ShouldThrowArgumentException_GivenNonReadableStream()
|
||||
[CLSCompliant(false)]
|
||||
public void ReadUInt32_ShouldThrowArgumentException_GivenNonReadableStream()
|
||||
{
|
||||
Stream stream = new DummyStream();
|
||||
Assert.Throws<ArgumentException>(() => stream.ReadUInt32());
|
||||
@ -15,7 +16,8 @@ internal partial class StreamTests
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ReadUInt32_ShouldThrowArgumentNullException_GivenNullStream()
|
||||
[CLSCompliant(false)]
|
||||
public void ReadUInt32_ShouldThrowArgumentNullException_GivenNullStream()
|
||||
{
|
||||
Stream stream = null!;
|
||||
Assert.Throws<ArgumentNullException>(() => stream.ReadUInt32());
|
||||
@ -24,7 +26,8 @@ internal partial class StreamTests
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ReadUInt32_ShouldThrowArgumentOutOfRangeException_GivenInvalidEndiannessValue()
|
||||
[CLSCompliant(false)]
|
||||
public void ReadUInt32_ShouldThrowArgumentOutOfRangeException_GivenInvalidEndiannessValue()
|
||||
{
|
||||
// we don't need to enclose this stream in a using declaration, since disposing a
|
||||
// null stream is meaningless. NullStream.Dispose actually does nothing, anyway.
|
||||
@ -36,7 +39,8 @@ internal partial class StreamTests
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ReadUInt32_ShouldReadBigEndian_GivenBigEndian()
|
||||
[CLSCompliant(false)]
|
||||
public void ReadUInt32_ShouldReadBigEndian_GivenBigEndian()
|
||||
{
|
||||
using var stream = new MemoryStream();
|
||||
ReadOnlySpan<byte> bytes = stackalloc byte[] {0x00, 0x00, 0x01, 0xA4};
|
||||
@ -51,7 +55,8 @@ internal partial class StreamTests
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ReadUInt32_ShouldReadLittleEndian_GivenLittleEndian()
|
||||
[CLSCompliant(false)]
|
||||
public void ReadUInt32_ShouldReadLittleEndian_GivenLittleEndian()
|
||||
{
|
||||
using var stream = new MemoryStream();
|
||||
ReadOnlySpan<byte> bytes = stackalloc byte[] {0xA4, 0x01, 0x00, 0x00};
|
||||
|
@ -3,10 +3,11 @@ using X10D.IO;
|
||||
|
||||
namespace X10D.Tests.IO;
|
||||
|
||||
internal partial class StreamTests
|
||||
public partial class StreamTests
|
||||
{
|
||||
[Test]
|
||||
public void ReadUInt64_ShouldThrowArgumentException_GivenNonReadableStream()
|
||||
[CLSCompliant(false)]
|
||||
public void ReadUInt64_ShouldThrowArgumentException_GivenNonReadableStream()
|
||||
{
|
||||
Stream stream = new DummyStream();
|
||||
Assert.Throws<ArgumentException>(() => stream.ReadUInt64());
|
||||
@ -15,7 +16,8 @@ internal partial class StreamTests
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ReadUInt64_ShouldThrowArgumentNullException_GivenNullStream()
|
||||
[CLSCompliant(false)]
|
||||
public void ReadUInt64_ShouldThrowArgumentNullException_GivenNullStream()
|
||||
{
|
||||
Stream stream = null!;
|
||||
Assert.Throws<ArgumentNullException>(() => stream.ReadUInt64());
|
||||
@ -24,7 +26,8 @@ internal partial class StreamTests
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ReadUInt64_ShouldThrowArgumentOutOfRangeException_GivenInvalidEndiannessValue()
|
||||
[CLSCompliant(false)]
|
||||
public void ReadUInt64_ShouldThrowArgumentOutOfRangeException_GivenInvalidEndiannessValue()
|
||||
{
|
||||
// we don't need to enclose this stream in a using declaration, since disposing a
|
||||
// null stream is meaningless. NullStream.Dispose actually does nothing, anyway.
|
||||
@ -36,7 +39,8 @@ internal partial class StreamTests
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ReadUInt64_ShouldReadBigEndian_GivenBigEndian()
|
||||
[CLSCompliant(false)]
|
||||
public void ReadUInt64_ShouldReadBigEndian_GivenBigEndian()
|
||||
{
|
||||
using var stream = new MemoryStream();
|
||||
ReadOnlySpan<byte> bytes = stackalloc byte[] {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xA4};
|
||||
@ -51,7 +55,8 @@ internal partial class StreamTests
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ReadUInt64_ShouldWriteLittleEndian_GivenLittleEndian()
|
||||
[CLSCompliant(false)]
|
||||
public void ReadUInt64_ShouldWriteLittleEndian_GivenLittleEndian()
|
||||
{
|
||||
using var stream = new MemoryStream();
|
||||
ReadOnlySpan<byte> bytes = stackalloc byte[] {0xA4, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
|
@ -4,7 +4,7 @@ using X10D.IO;
|
||||
|
||||
namespace X10D.Tests.IO;
|
||||
|
||||
internal partial class StreamTests
|
||||
public partial class StreamTests
|
||||
{
|
||||
[Test]
|
||||
public void WriteDecimal_ShouldThrowArgumentException_GivenNonWriteableStream()
|
||||
|
@ -3,7 +3,7 @@ using X10D.IO;
|
||||
|
||||
namespace X10D.Tests.IO;
|
||||
|
||||
internal partial class StreamTests
|
||||
public partial class StreamTests
|
||||
{
|
||||
[Test]
|
||||
public void WriteDouble_ShouldThrowArgumentException_GivenNonWriteableStream()
|
||||
|
@ -3,7 +3,7 @@ using X10D.IO;
|
||||
|
||||
namespace X10D.Tests.IO;
|
||||
|
||||
internal partial class StreamTests
|
||||
public partial class StreamTests
|
||||
{
|
||||
[Test]
|
||||
public void WriteInt16_ShouldThrowArgumentException_GivenNonWriteableStream()
|
||||
|
@ -3,7 +3,7 @@ using X10D.IO;
|
||||
|
||||
namespace X10D.Tests.IO;
|
||||
|
||||
internal partial class StreamTests
|
||||
public partial class StreamTests
|
||||
{
|
||||
[Test]
|
||||
public void WriteInt32_ShouldThrowArgumentException_GivenNonWriteableStream()
|
||||
|
@ -3,7 +3,7 @@ using X10D.IO;
|
||||
|
||||
namespace X10D.Tests.IO;
|
||||
|
||||
internal partial class StreamTests
|
||||
public partial class StreamTests
|
||||
{
|
||||
[Test]
|
||||
public void WriteInt64_ShouldThrowArgumentException_GivenNonWriteableStream()
|
||||
|
@ -3,7 +3,7 @@ using X10D.IO;
|
||||
|
||||
namespace X10D.Tests.IO;
|
||||
|
||||
internal partial class StreamTests
|
||||
public partial class StreamTests
|
||||
{
|
||||
[Test]
|
||||
public void WriteSingle_ShouldThrowArgumentException_GivenNonWriteableStream()
|
||||
|
@ -3,10 +3,11 @@ using X10D.IO;
|
||||
|
||||
namespace X10D.Tests.IO;
|
||||
|
||||
internal partial class StreamTests
|
||||
public partial class StreamTests
|
||||
{
|
||||
[Test]
|
||||
public void WriteUInt16_ShouldThrowArgumentException_GivenNonWriteableStream()
|
||||
[CLSCompliant(false)]
|
||||
public void WriteUInt16_ShouldThrowArgumentException_GivenNonWriteableStream()
|
||||
{
|
||||
Stream stream = new DummyStream();
|
||||
Assert.Throws<ArgumentException>(() => stream.Write((ushort)420, Endianness.LittleEndian));
|
||||
@ -14,7 +15,8 @@ internal partial class StreamTests
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void WriteUInt16_ShouldThrowArgumentNullException_GivenNullStream()
|
||||
[CLSCompliant(false)]
|
||||
public void WriteUInt16_ShouldThrowArgumentNullException_GivenNullStream()
|
||||
{
|
||||
Stream stream = null!;
|
||||
Assert.Throws<ArgumentNullException>(() => stream.Write((ushort)420, Endianness.LittleEndian));
|
||||
@ -22,7 +24,8 @@ internal partial class StreamTests
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void WriteUInt16_ShouldThrowArgumentOutOfRangeException_GivenInvalidEndiannessValue()
|
||||
[CLSCompliant(false)]
|
||||
public void WriteUInt16_ShouldThrowArgumentOutOfRangeException_GivenInvalidEndiannessValue()
|
||||
{
|
||||
// we don't need to enclose this stream in a using declaration, since disposing a
|
||||
// null stream is meaningless. NullStream.Dispose actually does nothing, anyway.
|
||||
@ -35,7 +38,8 @@ internal partial class StreamTests
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void WriteUInt16_ShouldWriteBigEndian_GivenBigEndian()
|
||||
[CLSCompliant(false)]
|
||||
public void WriteUInt16_ShouldWriteBigEndian_GivenBigEndian()
|
||||
{
|
||||
using var stream = new MemoryStream();
|
||||
stream.Write((ushort)420, Endianness.BigEndian);
|
||||
@ -51,7 +55,8 @@ internal partial class StreamTests
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void WriteUInt16_ShouldWriteLittleEndian_GivenLittleEndian()
|
||||
[CLSCompliant(false)]
|
||||
public void WriteUInt16_ShouldWriteLittleEndian_GivenLittleEndian()
|
||||
{
|
||||
using var stream = new MemoryStream();
|
||||
stream.Write((ushort)420, Endianness.LittleEndian);
|
||||
|
@ -3,10 +3,11 @@ using X10D.IO;
|
||||
|
||||
namespace X10D.Tests.IO;
|
||||
|
||||
internal partial class StreamTests
|
||||
public partial class StreamTests
|
||||
{
|
||||
[Test]
|
||||
public void WriteUInt32_ShouldThrowArgumentException_GivenNonWriteableStream()
|
||||
[CLSCompliant(false)]
|
||||
public void WriteUInt32_ShouldThrowArgumentException_GivenNonWriteableStream()
|
||||
{
|
||||
Stream stream = new DummyStream();
|
||||
Assert.Throws<ArgumentException>(() => stream.Write(420U, Endianness.LittleEndian));
|
||||
@ -14,7 +15,8 @@ internal partial class StreamTests
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void WriteUInt32_ShouldThrowArgumentNullException_GivenNullStream()
|
||||
[CLSCompliant(false)]
|
||||
public void WriteUInt32_ShouldThrowArgumentNullException_GivenNullStream()
|
||||
{
|
||||
Stream stream = null!;
|
||||
Assert.Throws<ArgumentNullException>(() => stream.Write(420U, Endianness.LittleEndian));
|
||||
@ -22,7 +24,8 @@ internal partial class StreamTests
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void WriteUInt32_ShouldThrowArgumentOutOfRangeException_GivenInvalidEndiannessValue()
|
||||
[CLSCompliant(false)]
|
||||
public void WriteUInt32_ShouldThrowArgumentOutOfRangeException_GivenInvalidEndiannessValue()
|
||||
{
|
||||
// we don't need to enclose this stream in a using declaration, since disposing a
|
||||
// null stream is meaningless. NullStream.Dispose actually does nothing, anyway.
|
||||
@ -35,7 +38,8 @@ internal partial class StreamTests
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void WriteUInt32_ShouldWriteBigEndian_GivenBigEndian()
|
||||
[CLSCompliant(false)]
|
||||
public void WriteUInt32_ShouldWriteBigEndian_GivenBigEndian()
|
||||
{
|
||||
using var stream = new MemoryStream();
|
||||
stream.Write(420U, Endianness.BigEndian);
|
||||
@ -51,7 +55,8 @@ internal partial class StreamTests
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void WriteUInt32_ShouldWriteLittleEndian_GivenLittleEndian()
|
||||
[CLSCompliant(false)]
|
||||
public void WriteUInt32_ShouldWriteLittleEndian_GivenLittleEndian()
|
||||
{
|
||||
using var stream = new MemoryStream();
|
||||
stream.Write(420U, Endianness.LittleEndian);
|
||||
|
@ -3,10 +3,11 @@ using X10D.IO;
|
||||
|
||||
namespace X10D.Tests.IO;
|
||||
|
||||
internal partial class StreamTests
|
||||
public partial class StreamTests
|
||||
{
|
||||
[Test]
|
||||
public void WriteUInt64_ShouldThrowArgumentException_GivenNonWriteableStream()
|
||||
[CLSCompliant(false)]
|
||||
public void WriteUInt64_ShouldThrowArgumentException_GivenNonWriteableStream()
|
||||
{
|
||||
Stream stream = new DummyStream();
|
||||
Assert.Throws<ArgumentException>(() => stream.Write(420UL, Endianness.LittleEndian));
|
||||
@ -14,7 +15,8 @@ internal partial class StreamTests
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void WriteUInt64_ShouldThrowArgumentNullException_GivenNullStream()
|
||||
[CLSCompliant(false)]
|
||||
public void WriteUInt64_ShouldThrowArgumentNullException_GivenNullStream()
|
||||
{
|
||||
Stream stream = null!;
|
||||
Assert.Throws<ArgumentNullException>(() => stream.Write(420UL, Endianness.LittleEndian));
|
||||
@ -22,7 +24,8 @@ internal partial class StreamTests
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void WriteUInt64_ShouldThrowArgumentOutOfRangeException_GivenInvalidEndiannessValue()
|
||||
[CLSCompliant(false)]
|
||||
public void WriteUInt64_ShouldThrowArgumentOutOfRangeException_GivenInvalidEndiannessValue()
|
||||
{
|
||||
// we don't need to enclose this stream in a using declaration, since disposing a
|
||||
// null stream is meaningless. NullStream.Dispose actually does nothing, anyway.
|
||||
@ -35,7 +38,8 @@ internal partial class StreamTests
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void WriteUInt64_ShouldWriteBigEndian_GivenBigEndian()
|
||||
[CLSCompliant(false)]
|
||||
public void WriteUInt64_ShouldWriteBigEndian_GivenBigEndian()
|
||||
{
|
||||
using var stream = new MemoryStream();
|
||||
stream.Write(420UL, Endianness.BigEndian);
|
||||
@ -51,7 +55,8 @@ internal partial class StreamTests
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void WriteUInt64_ShouldWriteLittleEndian_GivenLittleEndian()
|
||||
[CLSCompliant(false)]
|
||||
public void WriteUInt64_ShouldWriteLittleEndian_GivenLittleEndian()
|
||||
{
|
||||
using var stream = new MemoryStream();
|
||||
stream.Write(420UL, Endianness.LittleEndian);
|
||||
|
@ -7,7 +7,7 @@ using X10D.IO;
|
||||
namespace X10D.Tests.IO;
|
||||
|
||||
[TestFixture]
|
||||
internal partial class StreamTests
|
||||
public partial class StreamTests
|
||||
{
|
||||
[Test]
|
||||
public void GetHashSha1ShouldBeCorrect()
|
||||
|
@ -5,7 +5,7 @@ using X10D.IO;
|
||||
namespace X10D.Tests.IO;
|
||||
|
||||
[TestFixture]
|
||||
internal class TextReaderTests
|
||||
public class TextReaderTests
|
||||
{
|
||||
[Test]
|
||||
public void EnumerateLines_ShouldYield10Lines_Given10LineString()
|
||||
|
@ -5,7 +5,7 @@ using X10D.IO;
|
||||
|
||||
namespace X10D.Tests.IO;
|
||||
|
||||
internal partial class TextWriterTests
|
||||
public partial class TextWriterTests
|
||||
{
|
||||
[Test]
|
||||
public void WriteNoAlloc_ShouldThrowArgumentNullException_GivenDouble_AndNullWriter()
|
||||
|
@ -5,7 +5,7 @@ using X10D.IO;
|
||||
|
||||
namespace X10D.Tests.IO;
|
||||
|
||||
internal partial class TextWriterTests
|
||||
public partial class TextWriterTests
|
||||
{
|
||||
[Test]
|
||||
public void WriteNoAlloc_ShouldThrowArgumentNullException_GivenInt32_AndNullWriter()
|
||||
|
@ -5,7 +5,7 @@ using X10D.IO;
|
||||
|
||||
namespace X10D.Tests.IO;
|
||||
|
||||
internal partial class TextWriterTests
|
||||
public partial class TextWriterTests
|
||||
{
|
||||
[Test]
|
||||
public void WriteNoAlloc_ShouldThrowArgumentNullException_GivenInt64_AndNullWriter()
|
||||
|
@ -5,7 +5,7 @@ using X10D.IO;
|
||||
|
||||
namespace X10D.Tests.IO;
|
||||
|
||||
internal partial class TextWriterTests
|
||||
public partial class TextWriterTests
|
||||
{
|
||||
[Test]
|
||||
public void WriteNoAlloc_ShouldThrowArgumentNullException_GivenSingle_AndNullWriter()
|
||||
|
@ -5,7 +5,7 @@ using X10D.IO;
|
||||
|
||||
namespace X10D.Tests.IO;
|
||||
|
||||
internal partial class TextWriterTests
|
||||
public partial class TextWriterTests
|
||||
{
|
||||
[Test]
|
||||
public void WriteNoAlloc_ShouldThrowArgumentNullException_GivenUInt32_AndNullWriter()
|
||||
|
@ -5,7 +5,7 @@ using X10D.IO;
|
||||
|
||||
namespace X10D.Tests.IO;
|
||||
|
||||
internal partial class TextWriterTests
|
||||
public partial class TextWriterTests
|
||||
{
|
||||
[Test]
|
||||
public void WriteNoAlloc_ShouldThrowArgumentNullException_GivenUInt64_AndNullWriter()
|
||||
|
@ -1,13 +1,11 @@
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace X10D.Tests.IO;
|
||||
|
||||
[TestFixture]
|
||||
[SuppressMessage("Design", "CA1001:Types that own disposable fields should be disposable")]
|
||||
internal partial class TextWriterTests
|
||||
public partial class TextWriterTests
|
||||
{
|
||||
private MemoryStream _stream = null!;
|
||||
private StreamWriter _writer = null!;
|
||||
|
@ -4,7 +4,8 @@ using X10D.IO;
|
||||
namespace X10D.Tests.IO;
|
||||
|
||||
[TestFixture]
|
||||
internal class UInt16Tests
|
||||
[CLSCompliant(false)]
|
||||
public class UInt16Tests
|
||||
{
|
||||
[Test]
|
||||
public void GetBytes_ReturnsCorrectValue()
|
||||
|
@ -4,7 +4,8 @@ using X10D.IO;
|
||||
namespace X10D.Tests.IO;
|
||||
|
||||
[TestFixture]
|
||||
internal class UInt32Tests
|
||||
[CLSCompliant(false)]
|
||||
public class UInt32Tests
|
||||
{
|
||||
[Test]
|
||||
public void GetBytes_ReturnsCorrectValue()
|
||||
|
@ -4,7 +4,8 @@ using X10D.IO;
|
||||
namespace X10D.Tests.IO;
|
||||
|
||||
[TestFixture]
|
||||
internal class UInt64Tests
|
||||
[CLSCompliant(false)]
|
||||
public class UInt64Tests
|
||||
{
|
||||
[Test]
|
||||
public void GetBytes_ReturnsCorrectValue()
|
||||
|
@ -4,7 +4,7 @@ using X10D.Linq;
|
||||
namespace X10D.Tests.Linq;
|
||||
|
||||
[TestFixture]
|
||||
internal class ByteTests
|
||||
public class ByteTests
|
||||
{
|
||||
[Test]
|
||||
public void ProductShouldBeCorrect()
|
||||
|
@ -4,7 +4,7 @@ using X10D.Linq;
|
||||
namespace X10D.Tests.Linq;
|
||||
|
||||
[TestFixture]
|
||||
internal class DecimalTests
|
||||
public class DecimalTests
|
||||
{
|
||||
[Test]
|
||||
public void ProductShouldBeCorrect()
|
||||
|
@ -4,7 +4,7 @@ using X10D.Linq;
|
||||
namespace X10D.Tests.Linq;
|
||||
|
||||
[TestFixture]
|
||||
internal class DoubleTests
|
||||
public class DoubleTests
|
||||
{
|
||||
[Test]
|
||||
public void ProductShouldBeCorrect()
|
||||
|
@ -4,7 +4,7 @@ using X10D.Linq;
|
||||
namespace X10D.Tests.Linq;
|
||||
|
||||
[TestFixture]
|
||||
internal class EnumerableTests
|
||||
public class EnumerableTests
|
||||
{
|
||||
[Test]
|
||||
public void Except_ShouldFilterElements_GivenMatchingElements()
|
||||
|
@ -4,7 +4,7 @@ using X10D.Linq;
|
||||
namespace X10D.Tests.Linq;
|
||||
|
||||
[TestFixture]
|
||||
internal class Int16Tests
|
||||
public class Int16Tests
|
||||
{
|
||||
[Test]
|
||||
public void ProductShouldBeCorrect()
|
||||
|
@ -4,7 +4,7 @@ using X10D.Linq;
|
||||
namespace X10D.Tests.Linq;
|
||||
|
||||
[TestFixture]
|
||||
internal class Int32Tests
|
||||
public class Int32Tests
|
||||
{
|
||||
[Test]
|
||||
public void ProductShouldBeCorrect()
|
||||
|
@ -4,7 +4,7 @@ using X10D.Linq;
|
||||
namespace X10D.Tests.Linq;
|
||||
|
||||
[TestFixture]
|
||||
internal class Int64Tests
|
||||
public class Int64Tests
|
||||
{
|
||||
[Test]
|
||||
public void ProductShouldBeCorrect()
|
||||
|
@ -4,7 +4,7 @@ using X10D.Linq;
|
||||
namespace X10D.Tests.Linq;
|
||||
|
||||
[TestFixture]
|
||||
internal class ReadOnlySpanTests
|
||||
public class ReadOnlySpanTests
|
||||
{
|
||||
[Test]
|
||||
public void AllShouldReturnTrueForEmptySpan()
|
||||
|
@ -4,7 +4,8 @@ using X10D.Linq;
|
||||
namespace X10D.Tests.Linq;
|
||||
|
||||
[TestFixture]
|
||||
internal class SByteTests
|
||||
[CLSCompliant(false)]
|
||||
public class SByteTests
|
||||
{
|
||||
[Test]
|
||||
public void ProductShouldBeCorrect()
|
||||
|
@ -4,7 +4,7 @@ using X10D.Linq;
|
||||
namespace X10D.Tests.Linq;
|
||||
|
||||
[TestFixture]
|
||||
internal class SingleTests
|
||||
public class SingleTests
|
||||
{
|
||||
[Test]
|
||||
public void ProductShouldBeCorrect()
|
||||
|
@ -4,7 +4,7 @@ using X10D.Linq;
|
||||
namespace X10D.Tests.Linq;
|
||||
|
||||
[TestFixture]
|
||||
internal class SpanTests
|
||||
public class SpanTests
|
||||
{
|
||||
[Test]
|
||||
public void AllShouldReturnTrueForEmptySpan()
|
||||
|
@ -4,7 +4,8 @@ using X10D.Linq;
|
||||
namespace X10D.Tests.Linq;
|
||||
|
||||
[TestFixture]
|
||||
internal class UInt16Tests
|
||||
[CLSCompliant(false)]
|
||||
public class UInt16Tests
|
||||
{
|
||||
[Test]
|
||||
public void ProductShouldBeCorrect()
|
||||
|
@ -4,7 +4,8 @@ using X10D.Linq;
|
||||
namespace X10D.Tests.Linq;
|
||||
|
||||
[TestFixture]
|
||||
internal class UInt32Tests
|
||||
[CLSCompliant(false)]
|
||||
public class UInt32Tests
|
||||
{
|
||||
[Test]
|
||||
public void ProductShouldBeCorrect()
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user