Skip to content

Commit

Permalink
remove unneeded DeploymentItem
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel-Svensson committed Nov 2, 2023
1 parent b60d4a8 commit 1904e34
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 19 deletions.
20 changes: 3 additions & 17 deletions src/OpenRiaServices.Tools/Test/NotificationMethodGeneratorTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,6 @@ namespace OpenRiaServices.Tools.Test
[TestClass()]
public class NotificationMethodGeneratorTest
{
private TestContext context;
public TestContext TestContext
{
get { return this.context; }
set { this.context = value; }
}

private static XmlReader XmlReader;

static IEnumerable<object[]> GetTestCasesFromXml(string filename, string nodeName, string[] attributes)
Expand All @@ -42,8 +35,6 @@ public static IEnumerable<object> PartialMethodsSnippetBlockTestCases
=> GetTestCasesFromXml("NotificationMethodGeneratorTests.xml", "PartialMethodsSnippetBlockArgs", new[] { "comments", "baseMethodNames", "parameters" });

[
DeploymentItem("OpenRiaServices.Tools\\Test\\NotificationMethodGeneratorTests.xml"),
DeploymentItem("OpenRiaServices.Tools\\Test\\NotificationMethodGeneratorTestCodeSnippets.xml"),
TestMethod,
DynamicData(nameof(PartialMethodsSnippetBlockTestCases))]
public void PartialMethodsSnippetBlockTest(string comments, string baseMethodNames, string parameters)
Expand All @@ -67,7 +58,7 @@ public void PartialMethodsSnippetBlockTest(bool isCSharp, string comments, strin
// do verification ...
if (XmlReader == null)
{
XmlReader = XmlReader.Create(this.TestContext.TestDeploymentDir + "\\NotificationMethodGeneratorTestCodeSnippets.xml");
XmlReader = XmlReader.Create("NotificationMethodGeneratorTestCodeSnippets.xml");

Check notice

Code scanning / CodeQL

Static field written by instance method Note

Write to static field from instance method, property, or constructor.
}

do
Expand Down Expand Up @@ -110,7 +101,6 @@ public static IEnumerable<object> OnCreatedMethodInvokeExpressionTestCases
=> GetTestCasesFromXml("NotificationMethodGeneratorTests.xml", "GetMethodInvokeExpressionStatementFor1Args", new[] { "comments", "baseMethodNames", "parameters" });

[
DeploymentItem("OpenRiaServices.Tools\\Test\\NotificationMethodGeneratorTests.xml"),
TestMethod(),
DynamicData(nameof(OnCreatedMethodInvokeExpressionTestCases)),
]
Expand Down Expand Up @@ -152,7 +142,6 @@ public static IEnumerable<object> AddMethodFor1TestCases
=> GetTestCasesFromXml("NotificationMethodGeneratorTests.xml", "AddMethodFor1Args", new[] { "comments" });

[
DeploymentItem("OpenRiaServices.Tools\\Test\\NotificationMethodGeneratorTests.xml"),
TestMethod(),
DynamicData(nameof(AddMethodFor1TestCases))]
public void AddMethodFor1Test(string comments)
Expand All @@ -178,7 +167,6 @@ public static IEnumerable<object> AddMethodFor2TestCases
=> GetTestCasesFromXml("NotificationMethodGeneratorTests.xml", "AddMethodFor2Args", new[] { "comments", "parameterDeclaration" });

[
DeploymentItem("OpenRiaServices.Tools\\Test\\NotificationMethodGeneratorTests.xml"),
TestMethod(),
DynamicData (nameof(AddMethodFor2TestCases))]
public void AddMethodFor2Test(string comments, string parameterDeclaration)
Expand Down Expand Up @@ -216,10 +204,8 @@ public void AddMethodFor2Test(bool isCSharp, string comments, string paramDeclAr
public static IEnumerable<object> AddMethodFor3TestCases
=> GetTestCasesFromXml("NotificationMethodGeneratorTests.xml", "AddMethodFor3Args", new[] { "comments", "parameters" });

[
DeploymentItem("OpenRiaServices.Tools\\Test\\NotificationMethodGeneratorTests.xml"),
TestMethod(),
DynamicData(nameof(AddMethodFor3TestCases))]
[TestMethod()]
[DynamicData(nameof(AddMethodFor3TestCases))]
public void AddMethodFor3Test(string comments, string paramDeclsArgs)
{
AddMethodFor3Test(true, comments, paramDeclsArgs);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@
</ItemGroup>
<ItemGroup>
<Content Include="NotificationMethodGeneratorTestCodeSnippets.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="NotificationMethodGeneratorTests.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="ProjectPath.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
Expand Down

0 comments on commit 1904e34

Please sign in to comment.