-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue with it.IsAny completion when working with overloads
- Loading branch information
Showing
13 changed files
with
220 additions
and
15 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
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
27 changes: 27 additions & 0 deletions
27
...plete/Abc.MoqComplete.Tests/data/AutoMockerItIsAnyCompletion/itIsAnyCompletionOverload.cs
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,27 @@ | ||
// ${COMPLETE_ITEM:It.IsAny<decimal>(), It.IsAny<decimal>(), It.IsAny<int>(), It.IsAny<int>(), It.IsAny<decimal>()} | ||
using Moq; | ||
using Moq.AutoMock; | ||
using NUnit.Framework; | ||
|
||
namespace ConsoleApp1.Tests | ||
{ | ||
public interface ITestInterface | ||
{ | ||
decimal GetGrossAmountInEuro(decimal price, decimal quantity, int securityId, int currencyId, decimal spotRateInEuro); | ||
decimal GetGrossAmountInEuro(string message); | ||
decimal GetGrossAmountInEuro(int trade); | ||
|
||
void Build(int temp); | ||
} | ||
|
||
[TestFixture] | ||
public class Test1 | ||
{ | ||
[Test] | ||
public void METHOD() | ||
{ | ||
var mock = new AutoMocker(); | ||
mock.Setup<ITestInterface>(x=>x.GetGrossAmountInEuro(It{caret})) | ||
} | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
.../Abc.MoqComplete.Tests/data/AutoMockerItIsAnyCompletion/itIsAnyCompletionOverload.cs.gold
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,27 @@ | ||
// ${COMPLETE_ITEM:It.IsAny<decimal>(), It.IsAny<decimal>(), It.IsAny<int>(), It.IsAny<int>(), It.IsAny<decimal>()} | ||
using Moq; | ||
using Moq.AutoMock; | ||
using NUnit.Framework; | ||
|
||
namespace ConsoleApp1.Tests | ||
{ | ||
public interface ITestInterface | ||
{ | ||
decimal GetGrossAmountInEuro(decimal price, decimal quantity, int securityId, int currencyId, decimal spotRateInEuro); | ||
decimal GetGrossAmountInEuro(string message); | ||
decimal GetGrossAmountInEuro(int trade); | ||
|
||
void Build(int temp); | ||
} | ||
|
||
[TestFixture] | ||
public class Test1 | ||
{ | ||
[Test] | ||
public void METHOD() | ||
{ | ||
var mock = new AutoMocker(); | ||
mock.Setup<ITestInterface>(x=>x.GetGrossAmountInEuro(It.IsAny<decimal>(), It.IsAny<decimal>(), It.IsAny<int>(), It.IsAny<int>(), It.IsAny<decimal>())){caret} | ||
} | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
...oqComplete.Tests/data/AutoMockerItIsAnyCompletion/itIsAnyCompletionOverloadAndGenerics.cs
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,28 @@ | ||
// ${COMPLETE_ITEM:It.IsAny<decimal>(), It.IsAny<decimal>(), It.IsAny<int>(), It.IsAny<int>(), It.IsAny<decimal>()} | ||
using NUnit.Framework; | ||
using System; | ||
using Moq; | ||
using Moq.AutoMock; | ||
|
||
namespace ConsoleApp1.Tests | ||
{ | ||
public interface ITestInterface<T> | ||
{ | ||
decimal GetGrossAmountInEuro(decimal price, T quantity, int securityId, int currencyId, decimal spotRateInEuro); | ||
decimal GetGrossAmountInEuro(string message); | ||
decimal GetGrossAmountInEuro(int trade); | ||
|
||
void Build(int temp); | ||
} | ||
|
||
[TestFixture] | ||
public class Test1 | ||
{ | ||
[Test] | ||
public void METHOD() | ||
{ | ||
var mock = new AutoMocker(); | ||
mock.Setup<ITestInterface<decimal>>(x=>x.GetGrossAmountInEuro(It{caret})) | ||
} | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
...plete.Tests/data/AutoMockerItIsAnyCompletion/itIsAnyCompletionOverloadAndGenerics.cs.gold
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,28 @@ | ||
// ${COMPLETE_ITEM:It.IsAny<decimal>(), It.IsAny<decimal>(), It.IsAny<int>(), It.IsAny<int>(), It.IsAny<decimal>()} | ||
using NUnit.Framework; | ||
using System; | ||
using Moq; | ||
using Moq.AutoMock; | ||
|
||
namespace ConsoleApp1.Tests | ||
{ | ||
public interface ITestInterface<T> | ||
{ | ||
decimal GetGrossAmountInEuro(decimal price, T quantity, int securityId, int currencyId, decimal spotRateInEuro); | ||
decimal GetGrossAmountInEuro(string message); | ||
decimal GetGrossAmountInEuro(int trade); | ||
|
||
void Build(int temp); | ||
} | ||
|
||
[TestFixture] | ||
public class Test1 | ||
{ | ||
[Test] | ||
public void METHOD() | ||
{ | ||
var mock = new AutoMocker(); | ||
mock.Setup<ITestInterface<decimal>>(x=>x.GetGrossAmountInEuro(It.IsAny<decimal>(), It.IsAny<decimal>(), It.IsAny<int>(), It.IsAny<int>(), It.IsAny<decimal>())){caret} | ||
} | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
Abc.MoqComplete/Abc.MoqComplete.Tests/data/ItIsAnyCompletion/itIsAnyCompletionOverload.cs
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,23 @@ | ||
// ${COMPLETE_ITEM:It.IsAny<decimal>(), It.IsAny<decimal>(), It.IsAny<int>(), It.IsAny<int>(), It.IsAny<decimal>()} | ||
using Moq; | ||
|
||
namespace ConsoleApp1.Tests | ||
{ | ||
public interface ITestInterface | ||
{ | ||
decimal GetGrossAmountInEuro(decimal price, decimal quantity, int securityId, int currencyId, decimal spotRateInEuro); | ||
decimal GetGrossAmountInEuro(string message); | ||
decimal GetGrossAmountInEuro(int trade); | ||
|
||
void Build(int temp); | ||
} | ||
|
||
public class Test1 | ||
{ | ||
public void METHOD() | ||
{ | ||
var mock = new Mock<ITestInterface>(); | ||
mock.Setup(x=>x.GetGrossAmountInEuro(it{caret})) | ||
} | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
...oqComplete/Abc.MoqComplete.Tests/data/ItIsAnyCompletion/itIsAnyCompletionOverload.cs.gold
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,23 @@ | ||
// ${COMPLETE_ITEM:It.IsAny<decimal>(), It.IsAny<decimal>(), It.IsAny<int>(), It.IsAny<int>(), It.IsAny<decimal>()} | ||
using Moq; | ||
|
||
namespace ConsoleApp1.Tests | ||
{ | ||
public interface ITestInterface | ||
{ | ||
decimal GetGrossAmountInEuro(decimal price, decimal quantity, int securityId, int currencyId, decimal spotRateInEuro); | ||
decimal GetGrossAmountInEuro(string message); | ||
decimal GetGrossAmountInEuro(int trade); | ||
|
||
void Build(int temp); | ||
} | ||
|
||
public class Test1 | ||
{ | ||
public void METHOD() | ||
{ | ||
var mock = new Mock<ITestInterface>(); | ||
mock.Setup(x=>x.GetGrossAmountInEuro(It.IsAny<decimal>(), It.IsAny<decimal>(), It.IsAny<int>(), It.IsAny<int>(), It.IsAny<decimal>())){caret} | ||
} | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
...lete/Abc.MoqComplete.Tests/data/ItIsAnyCompletion/itIsAnyCompletionOverloadAndGenerics.cs
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,23 @@ | ||
// ${COMPLETE_ITEM:It.IsAny<decimal>(), It.IsAny<decimal>(), It.IsAny<int>(), It.IsAny<int>(), It.IsAny<decimal>()} | ||
using Moq; | ||
|
||
namespace ConsoleApp1.Tests | ||
{ | ||
public interface ITestInterface<T> | ||
{ | ||
decimal GetGrossAmountInEuro(decimal price, T quantity, int securityId, int currencyId, decimal spotRateInEuro); | ||
decimal GetGrossAmountInEuro(string message); | ||
decimal GetGrossAmountInEuro(int trade); | ||
|
||
void Build(int temp); | ||
} | ||
|
||
public class Test1 | ||
{ | ||
public void METHOD() | ||
{ | ||
var mock = new Mock<ITestInterface<decimal>>(); | ||
mock.Setup(x=>x.GetGrossAmountInEuro(it{caret})) | ||
} | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
...Abc.MoqComplete.Tests/data/ItIsAnyCompletion/itIsAnyCompletionOverloadAndGenerics.cs.gold
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,23 @@ | ||
// ${COMPLETE_ITEM:It.IsAny<decimal>(), It.IsAny<decimal>(), It.IsAny<int>(), It.IsAny<int>(), It.IsAny<decimal>()} | ||
using Moq; | ||
|
||
namespace ConsoleApp1.Tests | ||
{ | ||
public interface ITestInterface<T> | ||
{ | ||
decimal GetGrossAmountInEuro(decimal price, T quantity, int securityId, int currencyId, decimal spotRateInEuro); | ||
decimal GetGrossAmountInEuro(string message); | ||
decimal GetGrossAmountInEuro(int trade); | ||
|
||
void Build(int temp); | ||
} | ||
|
||
public class Test1 | ||
{ | ||
public void METHOD() | ||
{ | ||
var mock = new Mock<ITestInterface<decimal>>(); | ||
mock.Setup(x=>x.GetGrossAmountInEuro(It.IsAny<decimal>(), It.IsAny<decimal>(), It.IsAny<int>(), It.IsAny<int>(), It.IsAny<decimal>())){caret} | ||
} | ||
} | ||
} |
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 |
---|---|---|
|
@@ -22,7 +22,7 @@ | |
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<Version>1.3.2</Version> | ||
<Version>1.3.3</Version> | ||
</PropertyGroup> | ||
|
||
</Project> |
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