-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
switch to arg collections instead of tuples of args (#15)
* add coverage to new test * add property tests * change arg.any to method instead of prop * generic classes working * generic classes working and fixed indexers * remove unused code * update test coverage process * no need to restore (I think?) * add props * switch up the order * clean up buildAndTest yaml * switch up NumTimes * add throws functionality * add interface overload tests * fix tests slnf * add support for internal interface calls * fix tests * add nuget icon * fix warnings * exclude dummy class from code cov * add more generic tests * Merge remote-tracking branch 'origin/main' into dev * fix errors * add tests for virtual members * builds, but logic doesn't work * wip redoing with argCollection instead of generic param list * this actually builds * fix the setter test * generic method tests now working * everything is fixed * add additional tests for setting out params * delete a bunch of code :) * this works when you 'dotnet clean' followed by ' dotnet-coverage collect "dotnet test -c Release -s .\CodeCoverage.runsettings" -f xml * seems to be fully working when I run dotnet-coverage collect "dotnet run" -f cobertura -s ..\..\CodeCoverage.runsettings * change build pipeline * bump .net version * modify pipeline * try something else? * try loading generator assembly? * please work * please * can I add some logging? * bump log severity * try again * try again * does this point to dll? * try this * get cool message * try this * try this * Revert "try this" This reverts commit a4b5f9d. * added some callback and return tests with new arg colletions * fix ci pipeline * generate repo badge * don't generate setter for non-byRef parameters * remove logging call
- Loading branch information
Showing
69 changed files
with
2,295 additions
and
8,873 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,26 +12,23 @@ jobs: | |
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup .NET 8 | ||
- name: Setup .NET 9 | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: '8.0.x' | ||
|
||
- name: Restore Dependencies | ||
run: dotnet restore | ||
dotnet-version: '9.0.x' | ||
|
||
- name: Test And Collect CodeCov | ||
run: | | ||
dotnet tool install --global dotnet-coverage | ||
dotnet-coverage collect "dotnet test --no-restore -c Release" -f xml | ||
dotnet-coverage collect "dotnet run --project ./tests/MockMe.Tests.Runner/" -f cobertura -s ./CodeCoverage.runsettings | ||
- name: Generate report | ||
uses: danielpalme/[email protected] | ||
with: | ||
reports: './output.xml' | ||
reports: './output.cobertura.xml' | ||
targetdir: './tests/TestResults' | ||
reporttypes: 'lcov' | ||
filefilters: '-*\*.g.cs' | ||
# reporttypes: 'html' | ||
|
||
- name: Coveralls | ||
uses: coverallsapp/github-action@master | ||
|
@@ -40,8 +37,7 @@ jobs: | |
path-to-lcov: ./tests/TestResults/lcov.info | ||
|
||
- name: Pack NuGet Packages | ||
# run: dotnet pack --configuration Release --no-build --output ./packages --version 0.0.1-dev.$GITHUB_RUN_ID | ||
run: dotnet pack --configuration Release --no-build --output ./packages /p:Version=0.0.1-dev | ||
run: dotnet pack --configuration Release --output ./packages /p:Version=0.0.1-dev | ||
|
||
- name: Upload NuGet Packages | ||
uses: actions/upload-artifact@v4 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,3 +16,34 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: Andrew-Chen-Wang/github-wiki-action@v4 | ||
|
||
build_and_pack: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup .NET 9 | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: '9.0.x' | ||
|
||
- name: Test And Collect CodeCov | ||
run: | | ||
dotnet tool install --global dotnet-coverage | ||
dotnet-coverage collect "dotnet run --project ./tests/MockMe.Tests.Runner/" -f cobertura -s ./CodeCoverage.runsettings | ||
- name: Generate report | ||
uses: danielpalme/[email protected] | ||
with: | ||
reports: './output.cobertura.xml' | ||
targetdir: './tests/TestResults' | ||
reporttypes: 'lcov' | ||
# reporttypes: 'html' | ||
|
||
- name: Coveralls | ||
uses: coverallsapp/github-action@master | ||
with: | ||
github-token: ${{ secrets.COVERALLS_REPO_TOKEN }} | ||
path-to-lcov: ./tests/TestResults/lcov.info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -366,3 +366,5 @@ MigrationBackup/ | |
openSees/lib | ||
|
||
output.xml | ||
|
||
output.cobertura.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<RunSettings> | ||
<DataCollectionRunSettings> | ||
<DataCollectors> | ||
<DataCollector friendlyName="Code Coverage" uri="datacollector://Microsoft/CodeCoverage/2.0" assemblyQualifiedName="Microsoft.VisualStudio.Coverage.DynamicCoverageDataCollector, Microsoft.VisualStudio.TraceCollector, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> | ||
<Configuration> | ||
<!--<Option Name="IncludeUninstrumentedCode" Value="true" />--> | ||
<!--<Option Name="ExcludeFromCodeCoverage"> */**/*.g.cs </Option>--> | ||
<CodeCoverage> | ||
<ModulePaths> | ||
<Exclude> | ||
<ModulePath>.MockMe.Tests.ExampleClasses.dll$</ModulePath> | ||
<!--<ModulePath>.*Tests.*</ModulePath>--> | ||
</Exclude> | ||
</ModulePaths> | ||
<Sources> | ||
<Exclude> | ||
<Source>.*Polysharp.*</Source> | ||
<Source>.*.g.cs$</Source> | ||
</Exclude> | ||
</Sources> | ||
|
||
<CollectFromChildProcesses>True</CollectFromChildProcesses> | ||
<!--<UseVerifiableInstrumentation>False</UseVerifiableInstrumentation>--> | ||
<!--<UseVerifiableInstrumentation>False</UseVerifiableInstrumentation>--> | ||
<EnableStaticNativeInstrumentation>False</EnableStaticNativeInstrumentation> | ||
<EnableDynamicNativeInstrumentation>False</EnableDynamicNativeInstrumentation> | ||
</CodeCoverage> | ||
</Configuration> | ||
</DataCollector> | ||
</DataCollectors> | ||
</DataCollectionRunSettings> | ||
</RunSettings> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,14 @@ | ||
namespace MockMe.Abstractions; | ||
|
||
public class MockReplacementInfo | ||
public class MockReplacementInfo(GenericMethodInfo typeToReplace, GenericMethodInfo sourceType) | ||
{ | ||
public MockReplacementInfo(GenericMethodInfo typeToReplace, GenericMethodInfo sourceType) | ||
{ | ||
this.TypeToReplace = typeToReplace; | ||
this.SourceType = sourceType; | ||
} | ||
|
||
public GenericMethodInfo TypeToReplace { get; } | ||
public GenericMethodInfo SourceType { get; } | ||
public GenericMethodInfo TypeToReplace { get; } = typeToReplace; | ||
public GenericMethodInfo SourceType { get; } = sourceType; | ||
} | ||
|
||
public class GenericMethodInfo | ||
public class GenericMethodInfo(string assemblyName, string typeFullName, string methodName) | ||
{ | ||
public GenericMethodInfo(string assemblyName, string typeFullName, string methodName) | ||
{ | ||
this.AssemblyName = assemblyName; | ||
this.TypeFullName = typeFullName; | ||
this.MethodName = methodName; | ||
} | ||
|
||
public string AssemblyName { get; } | ||
public string TypeFullName { get; } | ||
public string MethodName { get; } | ||
public string AssemblyName { get; } = assemblyName; | ||
public string TypeFullName { get; } = typeFullName; | ||
public string MethodName { get; } = methodName; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.