Skip to content

Commit

Permalink
Fix spacing issues with Callback completion
Browse files Browse the repository at this point in the history
  • Loading branch information
lconstan committed Jun 11, 2022
1 parent 102cb18 commit 78462f6
Show file tree
Hide file tree
Showing 19 changed files with 28 additions and 28 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ${COMPLETE_ITEM:Callback<int,string,bool>((i,toto,ok) => {\})}
// ${COMPLETE_ITEM:Callback<int, string, bool>((i, toto, ok) => {\})}
using Moq;
using Moq.AutoMock;
using NUnit.Framework;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ${COMPLETE_ITEM:Callback<int,string,bool>((i,toto,ok) => {\})}
// ${COMPLETE_ITEM:Callback<int, string, bool>((i, toto, ok) => {\})}
using Moq;
using Moq.AutoMock;
using NUnit.Framework;
Expand All @@ -18,7 +18,7 @@ namespace ConsoleApp1.Tests
{
var _mocker = new AutoMocker();
_mocker.Setup<ITestInterface>(x => x.BuildSomething(It.IsAny<int>(),It.IsAny<string>(), It.IsAny<bool>()))
.Callback<int,string,bool>((i,toto,ok) => {{caret}})
.Callback<int, string, bool>((i, toto, ok) => {{caret}})
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ${COMPLETE_ITEM:Callback<int,string,bool>((i,toto,ok) => {\})}
// ${COMPLETE_ITEM:Callback<int, string, bool>((i, toto, ok) => {\})}
using Moq;
using Moq.AutoMock;
using NUnit.Framework;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ${COMPLETE_ITEM:Callback<int,string,bool>((i,toto,ok) => {\})}
// ${COMPLETE_ITEM:Callback<int, string, bool>((i, toto, ok) => {\})}
using Moq;
using Moq.AutoMock;
using NUnit.Framework;
Expand All @@ -19,7 +19,7 @@ namespace ConsoleApp1.Tests
var _mocker = new AutoMocker();
_mocker.Setup<ITestInterface>(x => x.BuildSomething(It.IsAny<int>(),It.IsAny<string>(), It.IsAny<bool>()))
.Returns(0)
.Callback<int,string,bool>((i,toto,ok) => {{caret}})
.Callback<int, string, bool>((i, toto, ok) => {{caret}})
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ${COMPLETE_ITEM:Callback<ITest2,double,string>((test,test2,test3) => {\})}
// ${COMPLETE_ITEM:Callback<ITest2, double, string>((test, test2, test3) => {\})}
using NUnit.Framework;
using Moq;
using Moq.AutoMock;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ${COMPLETE_ITEM:Callback<ITest2,double,string>((test,test2,test3) => {\})}
// ${COMPLETE_ITEM:Callback<ITest2, double, string>((test, test2, test3) => {\})}
using NUnit.Framework;
using Moq;
using Moq.AutoMock;
Expand All @@ -24,7 +24,7 @@ namespace ConsoleApp1.Tests
{
var _mocker = new AutoMocker();
_mocker.Setup<ITest2>(x=>x.Coco(It.IsAny<ITest2>(), It.IsAny<double>(), It.IsAny<string>()))
.Callback<ITest2,double,string>((test,test2,test3) => {{caret}})
.Callback<ITest2, double, string>((test, test2, test3) => {{caret}})
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ${COMPLETE_ITEM:Callback<int,string,bool>((i,toto,ok) => {\})}
// ${COMPLETE_ITEM:Callback<int, string, bool>((i, toto, ok) => {\})}
using Moq;
using NUnit.Framework;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ${COMPLETE_ITEM:Callback<int,string,bool>((i,toto,ok) => {\})}
// ${COMPLETE_ITEM:Callback<int, string, bool>((i, toto, ok) => {\})}
using Moq;
using NUnit.Framework;

Expand All @@ -17,7 +17,7 @@ namespace ConsoleApp1.Tests
{
Mock<ITestInterface> temp = new Mock<ITestInterface>();
temp.Setup(x => x.BuildSomething(It.IsAny<int>(),It.IsAny<string>(), It.IsAny<bool>()))
.Callback<int,string,bool>((i,toto,ok) => {{caret}})
.Callback<int, string, bool>((i, toto, ok) => {{caret}})
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ${COMPLETE_ITEM:Callback<int,string,bool>((i,toto,ok) => {\})}
// ${COMPLETE_ITEM:Callback<int, string, bool>((i, toto, ok) => {\})}
using Moq;
using NUnit.Framework;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ${COMPLETE_ITEM:Callback<int,string,bool>((i,toto,ok) => {\})}
// ${COMPLETE_ITEM:Callback<int, string, bool>((i, toto, ok) => {\})}
using Moq;
using NUnit.Framework;

Expand All @@ -18,7 +18,7 @@ namespace ConsoleApp1.Tests
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}})
.Callback<int, string, bool>((i, toto, ok) => {{caret}})
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ${COMPLETE_ITEM:Callback<int,string,bool>((i,toto,ok) => {\})}
// ${COMPLETE_ITEM:Callback<int, string, bool>((i, toto, ok) => {\})}
using Moq;
using NUnit.Framework;
using System.Threading.Tasks;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ${COMPLETE_ITEM:Callback<int,string,bool>((i,toto,ok) => {\})}
// ${COMPLETE_ITEM:Callback<int, string, bool>((i, toto, ok) => {\})}
using Moq;
using NUnit.Framework;
using System.Threading.Tasks;
Expand All @@ -19,7 +19,7 @@ namespace ConsoleApp1.Tests
Mock<ITestInterface> temp = new Mock<ITestInterface>();
temp.Setup(x => x.BuildSomething(It.IsAny<int>(),It.IsAny<string>(), It.IsAny<bool>()))
.ReturnsAsync(0)
.Callback<int,string,bool>((i,toto,ok) => {{caret}})
.Callback<int, string, bool>((i, toto, ok) => {{caret}})
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ${COMPLETE_ITEM:Callback<int,string,bool>((i,toto,ok) => {\})}
// ${COMPLETE_ITEM:Callback<int, string, bool>((i, toto, ok) => {\})}
using Moq;
using NUnit.Framework;
using System.Threading.Tasks;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ${COMPLETE_ITEM:Callback<int,string,bool>((i,toto,ok) => {\})}
// ${COMPLETE_ITEM:Callback<int, string, bool>((i, toto, ok) => {\})}
using Moq;
using NUnit.Framework;
using System.Threading.Tasks;
Expand All @@ -19,7 +19,7 @@ namespace ConsoleApp1.Tests
Mock<ITestInterface> temp = new Mock<ITestInterface>();
temp.Setup(x => x.BuildSomething(It.IsAny<int>(),It.IsAny<string>(), It.IsAny<bool>()))
.ReturnsAsync<int, string, bool, ITestInterface, int>((i, j, k) => 42)
.Callback<int,string,bool>((i,toto,ok) => {{caret}})
.Callback<int, string, bool>((i, toto, ok) => {{caret}})
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ${COMPLETE_ITEM:Callback<int,string,bool>((i,toto,ok) => {\})}
// ${COMPLETE_ITEM:Callback<int, string, bool>((i, toto, ok) => {\})}
using Moq;
using NUnit.Framework;
using System.Threading.Tasks;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ${COMPLETE_ITEM:Callback<int,string,bool>((i,toto,ok) => {\})}
// ${COMPLETE_ITEM:Callback<int, string, bool>((i, toto, ok) => {\})}
using Moq;
using NUnit.Framework;
using System.Threading.Tasks;
Expand All @@ -19,7 +19,7 @@ namespace ConsoleApp1.Tests
Mock<ITestInterface> temp = new Mock<ITestInterface>();
temp.Setup(x => x.BuildSomething(It.IsAny<int>(),It.IsAny<string>(), It.IsAny<bool>()))
.ReturnsAsync((int i, string j, bool k) => 42)
.Callback<int,string,bool>((i,toto,ok) => {{caret}})
.Callback<int, string, bool>((i, toto, ok) => {{caret}})
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ${COMPLETE_ITEM:Callback<ITest2,double,string>((test,test2,test3) => {\})}
// ${COMPLETE_ITEM:Callback<ITest2, double, string>((test, test2, test3) => {\})}
using NUnit.Framework;
using Moq;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ${COMPLETE_ITEM:Callback<ITest2,double,string>((test,test2,test3) => {\})}
// ${COMPLETE_ITEM:Callback<ITest2, double, string>((test, test2, test3) => {\})}
using NUnit.Framework;
using Moq;

Expand All @@ -23,7 +23,7 @@ namespace ConsoleApp1.Tests
{
var m = new Mock<ITest2>();
m.Setup(x=>x.Coco(It.IsAny<ITest2>(), It.IsAny<double>(), It.IsAny<string>()))
.Callback<ITest2,double,string>((test,test2,test3) => {{caret}})
.Callback<ITest2, double, string>((test, test2, test3) => {{caret}})

}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ protected override bool AddLookupItems(CSharpCodeCompletionContext context, IIte

var types = GetMockedMethodParameterTypes(solution, invocation);
var variablesName = mockedMethod.Parameters.Select(p => p.ShortName);
var proposedCallback = $"Callback<{string.Join(",", types)}>(({string.Join(",", variablesName)}) => {{}})";
var proposedCallback = $"Callback<{string.Join(", ", types)}>(({string.Join(", ", variablesName)}) => {{}})";

var item = CSharpLookupItemFactory.Instance.CreateKeywordLookupItem(context,
proposedCallback,
Expand Down

0 comments on commit 78462f6

Please sign in to comment.