Skip to content
This repository has been archived by the owner on Jul 16, 2023. It is now read-only.

Commit

Permalink
Updating the samples and the documentation
Browse files Browse the repository at this point in the history
references #10
  • Loading branch information
pvandervelde committed Jun 10, 2019
1 parent f8974c6 commit 26b3a95
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
</NuGetPackageImportStamp>
<Use64BitIISExpress />
</PropertyGroup>
<Import Project="$(MSBuildThisFileDirectory)/../../src/base.props" />
<PropertyGroup>
<LogFile>..\..\build\logs\docfx.txt</LogFile>
</PropertyGroup>
Expand All @@ -52,6 +53,8 @@
<Reference Include="System.EnterpriseServices" />
</ItemGroup>
<ItemGroup>
<Content Include=".gitignore" />
<Content Include="api\.gitignore" />
<Content Include="toc.yml" />
<Content Include="index.md" />
<Content Include="docfx.json" />
Expand All @@ -60,12 +63,6 @@
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\nuclei.nunit.extensions\Nuclei.Nunit.Extensions.csproj">
<Project>{95F183AF-7BBA-4ECE-AC1C-EE006317470D}</Project>
<Name>Nuclei.Nunit.Extensions</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="packages.config" />
</ItemGroup>
Expand All @@ -82,6 +79,18 @@
<Analyzer Include="..\..\packages\Microsoft.NetFramework.Analyzers.2.9.3\analyzers\dotnet\cs\Microsoft.NetFramework.Analyzers.dll" />
<Analyzer Include="..\..\packages\Microsoft.NetFramework.Analyzers.2.9.3\analyzers\dotnet\cs\Microsoft.NetFramework.CSharp.Analyzers.dll" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\nuclei.nunit.extensions\Nuclei.NUnit.Extensions.csproj">
<Project>{95f183af-7bba-4ece-ac1c-ee006317470d}</Project>
<Name>Nuclei.NUnit.Extensions</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="articles\toc.md" />
</ItemGroup>
<ItemGroup>
<Content Include="articles\intro.md" />
</ItemGroup>
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
Expand All @@ -107,18 +116,18 @@
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
<Import Project="..\..\packages\docfx.msbuild.2.1.0\build\docfx.msbuild.targets" Condition="Exists('..\..\packages\docfx.msbuild.2.1.0\build\docfx.msbuild.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\docfx.msbuild.2.1.0\build\docfx.msbuild.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\docfx.msbuild.2.1.0\build\docfx.msbuild.targets'))" />
<Error Condition="!Exists('..\..\packages\Microsoft.CodeAnalysis.VersionCheckAnalyzer.2.9.3\build\Microsoft.CodeAnalysis.VersionCheckAnalyzer.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.CodeAnalysis.VersionCheckAnalyzer.2.9.3\build\Microsoft.CodeAnalysis.VersionCheckAnalyzer.props'))" />
<Error Condition="!Exists('..\..\packages\Microsoft.CodeQuality.Analyzers.2.9.3\build\Microsoft.CodeQuality.Analyzers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.CodeQuality.Analyzers.2.9.3\build\Microsoft.CodeQuality.Analyzers.props'))" />
<Error Condition="!Exists('..\..\packages\Microsoft.NetCore.Analyzers.2.9.3\build\Microsoft.NetCore.Analyzers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.NetCore.Analyzers.2.9.3\build\Microsoft.NetCore.Analyzers.props'))" />
<Error Condition="!Exists('..\..\packages\Microsoft.NetFramework.Analyzers.2.9.3\build\Microsoft.NetFramework.Analyzers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.NetFramework.Analyzers.2.9.3\build\Microsoft.NetFramework.Analyzers.props'))" />
<Error Condition="!Exists('..\..\packages\Microsoft.CodeAnalysis.FxCopAnalyzers.2.9.3\build\Microsoft.CodeAnalysis.FxCopAnalyzers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.CodeAnalysis.FxCopAnalyzers.2.9.3\build\Microsoft.CodeAnalysis.FxCopAnalyzers.props'))" />
<Error Condition="!Exists('..\..\packages\docfx.console.2.42.4\build\docfx.console.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\docfx.console.2.42.4\build\docfx.console.targets'))" />
</Target>
<Import Project="..\..\packages\docfx.console.2.42.4\build\docfx.console.targets" Condition="Exists('..\..\packages\docfx.console.2.42.4\build\docfx.console.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">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
Expand Down
2 changes: 1 addition & 1 deletion doc/Nuclei.Nunit.Extensions.Documentation/packages.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="docfx.msbuild" version="2.1.0" targetFramework="net452" />
<package id="docfx.console" version="2.42.4" targetFramework="net462" developmentDependency="true" />
<package id="Microsoft.CodeAnalysis.FxCopAnalyzers" version="2.9.3" targetFramework="net452" />
<package id="Microsoft.CodeAnalysis.VersionCheckAnalyzer" version="2.9.3" targetFramework="net452" />
<package id="Microsoft.CodeQuality.Analyzers" version="2.9.3" targetFramework="net452" />
Expand Down
10 changes: 9 additions & 1 deletion doc/Nuclei.Nunit.Extensions.Samples/NameObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ public sealed class NameObject : IEquatable<NameObject>
/// <param name="first">The first object.</param>
/// <param name="second">The second object.</param>
/// <returns>The result of the operator.</returns>
[SuppressMessage(
"Microsoft.Design",
"CA1062:ValidateArgumentsOfPublicMethods",
Justification = "The nonNullObject cannot actually be null.")]
public static bool operator ==(NameObject first, NameObject second)
{
// Check if first is a null reference by using ReferenceEquals because
Expand Down Expand Up @@ -49,6 +53,10 @@ public sealed class NameObject : IEquatable<NameObject>
/// <param name="first">The first object.</param>
/// <param name="second">The second object.</param>
/// <returns>The result of the operator.</returns>
[SuppressMessage(
"Microsoft.Design",
"CA1062:ValidateArgumentsOfPublicMethods",
Justification = "The nonNullObject cannot actually be null.")]
public static bool operator !=(NameObject first, NameObject second)
{
// Check if first is a null reference by using ReferenceEquals because
Expand Down Expand Up @@ -86,7 +94,7 @@ public NameObject(string name)
{
if (name == null)
{
throw new ArgumentNullException("name");
throw new ArgumentNullException(nameof(name));
}

_name = name;
Expand Down
12 changes: 0 additions & 12 deletions doc/Nuclei.Nunit.Extensions.Samples/NameObjectTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,17 +118,5 @@ protected override IEqualityContractVerifier EqualityContract
return _equalityVerifier;
}
}

/// <summary>
/// Verifies that the object can be serialized and deserialized without losing information.
/// </summary>
[Test]
public void RoundTripSerialize()
{
var original = new NameObject("my_cool_name");
var copy = AssertExtensions.RoundTripSerialize(original);

Assert.AreEqual(original, copy);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<Import Project="$(SolutionDir)\base.props" />
<Import Project="$(MSBuildThisFileDirectory)/../../src/base.props" />
<ItemGroup>
<Reference Include="Nuclei.Build, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ee5b68ec5ad4ef93, processorArchitecture=MSIL">
<HintPath>..\..\packages\Nuclei.Build.1.0.0\lib\net40\Nuclei.Build.dll</HintPath>
Expand All @@ -48,12 +48,6 @@
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\nuclei.nunit.extensions\Nuclei.NUnit.Extensions.csproj">
<Project>{95f183af-7bba-4ece-ac1c-ee006317470d}</Project>
<Name>Nuclei.NUnit.Extensions</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Analyzer Include="..\..\packages\Microsoft.CodeAnalysis.VersionCheckAnalyzer.2.9.3\analyzers\dotnet\Microsoft.CodeAnalysis.VersionCheckAnalyzer.dll" />
<Analyzer Include="..\..\packages\Microsoft.CodeQuality.Analyzers.2.9.3\analyzers\dotnet\cs\Humanizer.dll" />
Expand All @@ -66,6 +60,12 @@
<Analyzer Include="..\..\packages\StyleCop.Analyzers.1.1.118\analyzers\dotnet\cs\StyleCop.Analyzers.CodeFixes.dll" />
<Analyzer Include="..\..\packages\StyleCop.Analyzers.1.1.118\analyzers\dotnet\cs\StyleCop.Analyzers.dll" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\nuclei.nunit.extensions\Nuclei.NUnit.Extensions.csproj">
<Project>{95f183af-7bba-4ece-ac1c-ee006317470d}</Project>
<Name>Nuclei.NUnit.Extensions</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
Expand Down
12 changes: 0 additions & 12 deletions doc/Nuclei.Nunit.Extensions.Samples/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@
//-----------------------------------------------------------------------

using System;
using System.Diagnostics.CodeAnalysis;
using System.Reflection;
using System.Runtime.InteropServices;
using Nuclei.Build;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
Expand Down Expand Up @@ -51,13 +49,3 @@
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0.0")]

// The time the assembly was build
[assembly: AssemblyBuildTime(buildTime: "1900-01-01T00:00:00.0000000+00:00")]

// The version from which the assembly was build
[module: SuppressMessage(
"Microsoft.Usage",
"CA2243:AttributeStringLiteralsShouldParseCorrectly",
Justification = "It's a VCS revision, not a version")]
[assembly: AssemblyBuildInformation(buildNumber: 0, versionControlInformation: "1234567890123456789012345678901234567890")]

0 comments on commit 26b3a95

Please sign in to comment.