-
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.
Provide Callback Completion after Returns
- Loading branch information
Showing
6 changed files
with
67 additions
and
6 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
24 changes: 24 additions & 0 deletions
24
Abc.MoqComplete/MoqComplete.Tests/data/CallbackCompletion/callbackCompletion_afterReturn.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,24 @@ | ||
// ${COMPLETE_ITEM:Callback<int,string,bool>((i,toto,ok) => {})} | ||
using Moq; | ||
using NUnit.Framework; | ||
|
||
namespace ConsoleApp1.Tests | ||
{ | ||
public interface ITestInterface | ||
{ | ||
int BuildSomething(int i, string toto, bool ok); | ||
} | ||
|
||
[TestFixture] | ||
public class Test1 | ||
{ | ||
[Test] | ||
public void METHOD() | ||
{ | ||
Mock<ITestInterface> temp = new Mock<ITestInterface>(); | ||
temp.Setup(x => x.BuildSomething(It.IsAny<int>(),It.IsAny<string>(), It.IsAny<bool>())) | ||
.Returns(0) | ||
.c{caret} | ||
} | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
...Complete/MoqComplete.Tests/data/CallbackCompletion/callbackCompletion_afterReturn.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,24 @@ | ||
// ${COMPLETE_ITEM:Callback<int,string,bool>((i,toto,ok) => {})} | ||
using Moq; | ||
using NUnit.Framework; | ||
|
||
namespace ConsoleApp1.Tests | ||
{ | ||
public interface ITestInterface | ||
{ | ||
int BuildSomething(int i, string toto, bool ok); | ||
} | ||
|
||
[TestFixture] | ||
public class Test1 | ||
{ | ||
[Test] | ||
public void METHOD() | ||
{ | ||
Mock<ITestInterface> temp = new Mock<ITestInterface>(); | ||
temp.Setup(x => x.BuildSomething(It.IsAny<int>(),It.IsAny<string>(), It.IsAny<bool>())) | ||
.Returns(0) | ||
.Callback<int,string,bool>((i,toto,ok) => {{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