diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
new file mode 100644
index 0000000..9f4fe5d
--- /dev/null
+++ b/.github/workflows/codeql-analysis.yml
@@ -0,0 +1,71 @@
+# For most projects, this workflow file will not need changing; you simply need
+# to commit it to your repository.
+#
+# You may wish to alter this file to override the set of languages analyzed,
+# or to provide custom queries or build logic.
+#
+# ******** NOTE ********
+# We have attempted to detect the languages in your repository. Please check
+# the `language` matrix defined below to confirm you have the correct set of
+# supported CodeQL languages.
+#
+name: "CodeQL"
+
+on:
+ push:
+ branches: [ master ]
+ pull_request:
+ # The branches below must be a subset of the branches above
+ branches: [ master ]
+ schedule:
+ - cron: '31 23 * * 0'
+
+jobs:
+ analyze:
+ name: Analyze
+ runs-on: ubuntu-latest
+ permissions:
+ actions: read
+ contents: read
+ security-events: write
+
+ strategy:
+ fail-fast: false
+ matrix:
+ language: [ 'csharp' ]
+ # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
+ # Learn more:
+ # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v2
+
+ # Initializes the CodeQL tools for scanning.
+ - name: Initialize CodeQL
+ uses: github/codeql-action/init@v1
+ with:
+ languages: ${{ matrix.language }}
+ # If you wish to specify custom queries, you can do so here or in a config file.
+ # By default, queries listed here will override any specified in a config file.
+ # Prefix the list here with "+" to use these queries and those in the config file.
+ # queries: ./path/to/local/query, your-org/your-repo/queries@main
+
+ # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
+ # If this step fails, then you should remove it and run the build manually (see below)
+ - name: Autobuild
+ uses: github/codeql-action/autobuild@v1
+
+ # ℹ️ Command-line programs to run using the OS shell.
+ # 📚 https://git.io/JvXDl
+
+ # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
+ # and modify them (or add more) to build your code if your project
+ # uses a compiled language
+
+ #- run: |
+ # make bootstrap
+ # make release
+
+ - name: Perform CodeQL Analysis
+ uses: github/codeql-action/analyze@v1
diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml
new file mode 100644
index 0000000..e7dcc46
--- /dev/null
+++ b/.github/workflows/dotnet.yml
@@ -0,0 +1,34 @@
+name: .NET Test
+
+on:
+ push:
+ pull_request:
+ branches: [ master, develop, release* ]
+
+jobs:
+
+ build:
+
+ env:
+ SOLUTION: "./source/Appccelerate.Bootstrapper.sln"
+
+ runs-on: windows-latest
+ strategy:
+ fail-fast: false
+
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Setup .NET
+ uses: actions/setup-dotnet@v1
+ with:
+ dotnet-version: 5.0.x
+
+ - name: Restore dependencies
+ run: dotnet restore ${{env.SOLUTION}}
+
+ - name: Build
+ run: dotnet build ${{env.SOLUTION}} --no-restore
+
+ - name: Test
+ run: dotnet test ${{env.SOLUTION}} --no-build --verbosity minimal
diff --git a/.gitignore b/.gitignore
index 5c1d8a8..5291ba9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -107,4 +107,5 @@ _UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
-Specs
\ No newline at end of file
+Specs
+source/.idea/.idea.Appccelerate.Bootstrapper/.idea/
diff --git a/README.md b/README.md
index c4a5e5d..835bde8 100644
--- a/README.md
+++ b/README.md
@@ -1 +1,8 @@
-Please see http://www.appccelerate.com/bootstrapper.html for documentation.
+# Appccelerate.Bootstrapper
+
+[](https://github.com/dav1dev/bootstrapper/actions/workflows/dotnet.yml)
+[](https://github.com/dav1dev/bootstrapper/actions/workflows/codeql-analysis.yml)
+
+Every application goes through start up and shutdown phases. The bootstrapper provides you an approved and extendable mechanism for bootstrapping the software life cycle.
+
+Please see [appccelerate.github.io/bootstrapper](https://appccelerate.github.io/bootstrapper.html) for documentation.
diff --git a/source/Analyzers.Facts.ruleset b/source/Analyzers.Facts.ruleset
new file mode 100644
index 0000000..b17a65a
--- /dev/null
+++ b/source/Analyzers.Facts.ruleset
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/source/Analyzers.Productive.ruleset b/source/Analyzers.Productive.ruleset
new file mode 100644
index 0000000..040d8ee
--- /dev/null
+++ b/source/Analyzers.Productive.ruleset
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/source/Analyzers.Specs.ruleset b/source/Analyzers.Specs.ruleset
new file mode 100644
index 0000000..97a624d
--- /dev/null
+++ b/source/Analyzers.Specs.ruleset
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/source/Appccelerate.Bootstrapper.Facts/AbstractStrategyTest.cs b/source/Appccelerate.Bootstrapper.Facts/AbstractStrategyTest.cs
index 904eac8..efd0581 100644
--- a/source/Appccelerate.Bootstrapper.Facts/AbstractStrategyTest.cs
+++ b/source/Appccelerate.Bootstrapper.Facts/AbstractStrategyTest.cs
@@ -19,7 +19,6 @@
namespace Appccelerate.Bootstrapper
{
using System;
-
using Appccelerate.Bootstrapper.Execution;
using Appccelerate.Bootstrapper.Extension;
using Appccelerate.Bootstrapper.Reporting;
@@ -48,7 +47,7 @@ public void BuildRunSyntax_WhenCalledMultipleTimes_ShouldThrowException()
{
this.testee.BuildRunSyntax();
- this.testee.Invoking(x => x.BuildRunSyntax()).ShouldThrow();
+ this.testee.Invoking(x => x.BuildRunSyntax()).Should().Throw();
}
[Fact]
@@ -65,7 +64,7 @@ public void BuildShutdownSyntax_WhenCalledMultipleTimes_ShouldThrowException()
{
this.testee.BuildShutdownSyntax();
- this.testee.Invoking(x => x.BuildShutdownSyntax()).ShouldThrow();
+ this.testee.Invoking(x => x.BuildShutdownSyntax()).Should().Throw();
}
[Fact]
@@ -114,12 +113,13 @@ public void Dispose_MultipleTimes_ShouldNotThrow()
{
this.testee.Dispose();
- this.testee.Invoking(t => t.Dispose()).ShouldNotThrow();
+ this.testee.Invoking(t => t.Dispose()).Should().NotThrow();
}
private class TestableAbstractStrategy : AbstractStrategy
{
- public TestableAbstractStrategy(ISyntaxBuilder runSyntaxBuilder, ISyntaxBuilder shutdownSyntaxBuilder)
+ public TestableAbstractStrategy(ISyntaxBuilder runSyntaxBuilder,
+ ISyntaxBuilder shutdownSyntaxBuilder)
: base(runSyntaxBuilder, shutdownSyntaxBuilder)
{
}
diff --git a/source/Appccelerate.Bootstrapper.Facts/Appccelerate.Bootstrapper.Facts.csproj b/source/Appccelerate.Bootstrapper.Facts/Appccelerate.Bootstrapper.Facts.csproj
index 46f13e0..85af532 100644
--- a/source/Appccelerate.Bootstrapper.Facts/Appccelerate.Bootstrapper.Facts.csproj
+++ b/source/Appccelerate.Bootstrapper.Facts/Appccelerate.Bootstrapper.Facts.csproj
@@ -1,139 +1,37 @@
-
-
-
+
- Debug
- AnyCPU
- {E5D38B10-5386-4774-A5E1-4E30C99DD1BC}
- Library
- Properties
Appccelerate.Bootstrapper
- Appccelerate.Bootstrapper.Facts
- v4.5
- 512
- 4e36768d
+ net48
+ false
-
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
+
+
+ Appccelerate.Bootstrapper.Facts
+ Copyright © 2008-2021
+ Appccelerate team
+ Appccelerate
+ Appccelerate.Bootstrapper
+
-
- ..\packages\Appccelerate.Fundamentals.2.8.0\lib\portable-windows8+net45\Appccelerate.Fundamentals.dll
-
-
- ..\packages\FakeItEasy.1.25.1\lib\net40\FakeItEasy.dll
-
-
- ..\packages\FluentAssertions.3.2.2\lib\net45\FluentAssertions.dll
-
-
- ..\packages\FluentAssertions.3.2.2\lib\net45\FluentAssertions.Core.dll
-
-
-
-
-
-
-
-
-
-
- ..\packages\xunit.1.9.2\lib\net20\xunit.dll
-
-
- ..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
-
-
-
+
-
-
- {8F1AEC30-49CF-482C-BC4E-281984487847}
- Appccelerate.Bootstrapper
-
-
-
-
-
- This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+
+ ../Analyzers.Facts.ruleset
+
+
diff --git a/source/Appccelerate.Bootstrapper.Facts/Behavior/DisposeExtensionBehaviorTest.cs b/source/Appccelerate.Bootstrapper.Facts/Behavior/DisposeExtensionBehaviorTest.cs
index 25feaf9..82323ef 100644
--- a/source/Appccelerate.Bootstrapper.Facts/Behavior/DisposeExtensionBehaviorTest.cs
+++ b/source/Appccelerate.Bootstrapper.Facts/Behavior/DisposeExtensionBehaviorTest.cs
@@ -43,7 +43,7 @@ public void Behave_ShouldDisposeDisposableExtensions()
this.testee.Behave(new List { notDisposableExtension, disposableExtension });
A.CallTo(() => notDisposableExtension.Dispose()).MustNotHaveHappened();
- A.CallTo(() => disposableExtension.Dispose()).MustHaveHappened(Repeated.Exactly.Once);
+ A.CallTo(() => disposableExtension.Dispose()).MustHaveHappenedOnceExactly();
}
[Fact]
diff --git a/source/Appccelerate.Bootstrapper.Facts/DefaultBootstrapperTest.cs b/source/Appccelerate.Bootstrapper.Facts/DefaultBootstrapperTest.cs
index 4ded0d5..608c576 100644
--- a/source/Appccelerate.Bootstrapper.Facts/DefaultBootstrapperTest.cs
+++ b/source/Appccelerate.Bootstrapper.Facts/DefaultBootstrapperTest.cs
@@ -59,7 +59,7 @@ public void Initialize_MultipleTimes_ShouldThrowException()
this.testee.Initialize(this.strategy);
- this.testee.Invoking(x => x.Initialize(A.Fake>())).ShouldThrow();
+ this.testee.Invoking(x => x.Initialize(A.Fake>())).Should().Throw();
}
[Fact]
@@ -75,7 +75,7 @@ public void Initialize_ShouldCreateReportingContext()
[Fact]
public void AddExtension_WhenNotInitialized_ShouldThrowInvalidOperationException()
{
- this.testee.Invoking(x => x.AddExtension(A.Fake())).ShouldThrow();
+ this.testee.Invoking(x => x.AddExtension(A.Fake())).Should().Throw();
}
[Fact]
@@ -152,7 +152,7 @@ public void Run_ShouldExecuteSyntaxAndExtensionsOnRunExecutor()
public void Run_ShouldThrowExceptionWhenNotInitialized()
{
this.testee.Invoking(t => t.Run())
- .ShouldThrow();
+ .Should().Throw();
}
[Fact]
@@ -195,7 +195,7 @@ public void Shutdown_ShouldExecuteSyntaxAndExtensionsOnShutdownExecutor()
public void Shutdown_ShouldThrowExceptionWhenNotInitialized()
{
this.testee.Invoking(t => t.Shutdown())
- .ShouldThrow();
+ .Should().Throw();
}
[Fact]
diff --git a/source/Appccelerate.Bootstrapper.Facts/Execution/ExecutorTest.cs b/source/Appccelerate.Bootstrapper.Facts/Execution/ExecutorTest.cs
index 1873a33..979a85a 100644
--- a/source/Appccelerate.Bootstrapper.Facts/Execution/ExecutorTest.cs
+++ b/source/Appccelerate.Bootstrapper.Facts/Execution/ExecutorTest.cs
@@ -16,6 +16,8 @@
//
//-------------------------------------------------------------------------------
+using Xunit;
+
namespace Appccelerate.Bootstrapper.Execution
{
using System.Collections.Generic;
@@ -58,7 +60,7 @@ public static IEnumerable