Skip to content

Commit

Permalink
Update test robustness
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalberger committed Oct 10, 2019
1 parent cfc4206 commit 832e5c7
Showing 1 changed file with 104 additions and 26 deletions.
130 changes: 104 additions & 26 deletions src/Cake.Issues.Tests/Serialization/IssueSerializationExtensionsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,10 @@ public void Should_Give_Correct_Result_For_MessageText_After_Roundtrip()
}
finally
{
System.IO.File.Delete(filePath.FullPath);
if (System.IO.File.Exists(filePath.FullPath))
{
System.IO.File.Delete(filePath.FullPath);
}
}
}

Expand All @@ -714,7 +717,10 @@ public void Should_Give_Correct_Result_For_MessageMarkdown_After_Roundtrip()
}
finally
{
System.IO.File.Delete(filePath.FullPath);
if (System.IO.File.Exists(filePath.FullPath))
{
System.IO.File.Delete(filePath.FullPath);
}
}
}

Expand All @@ -741,7 +747,10 @@ public void Should_Give_Correct_Result_For_MessageHtml_After_Roundtrip()
}
finally
{
System.IO.File.Delete(filePath.FullPath);
if (System.IO.File.Exists(filePath.FullPath))
{
System.IO.File.Delete(filePath.FullPath);
}
}
}

Expand All @@ -767,7 +776,10 @@ public void Should_Give_Correct_Result_For_ProviderType_After_Roundtrip()
}
finally
{
System.IO.File.Delete(filePath.FullPath);
if (System.IO.File.Exists(filePath.FullPath))
{
System.IO.File.Delete(filePath.FullPath);
}
}
}

Expand All @@ -793,7 +805,10 @@ public void Should_Give_Correct_Result_For_ProviderName_After_Roundtrip()
}
finally
{
System.IO.File.Delete(filePath.FullPath);
if (System.IO.File.Exists(filePath.FullPath))
{
System.IO.File.Delete(filePath.FullPath);
}
}
}

Expand All @@ -820,7 +835,10 @@ public void Should_Give_Correct_Result_For_ProjectFileRelativePath_After_Roundtr
}
finally
{
System.IO.File.Delete(filePath.FullPath);
if (System.IO.File.Exists(filePath.FullPath))
{
System.IO.File.Delete(filePath.FullPath);
}
}
}

Expand All @@ -847,7 +865,10 @@ public void Should_Give_Correct_Result_For_ProjectName_After_Roundtrip()
}
finally
{
System.IO.File.Delete(filePath.FullPath);
if (System.IO.File.Exists(filePath.FullPath))
{
System.IO.File.Delete(filePath.FullPath);
}
}
}

Expand All @@ -874,7 +895,10 @@ public void Should_Give_Correct_Result_For_AffectedFileRelativePath_After_Roundt
}
finally
{
System.IO.File.Delete(filePath.FullPath);
if (System.IO.File.Exists(filePath.FullPath))
{
System.IO.File.Delete(filePath.FullPath);
}
}
}

Expand All @@ -901,7 +925,10 @@ public void Should_Give_Correct_Result_For_Line_After_Roundtrip()
}
finally
{
System.IO.File.Delete(filePath.FullPath);
if (System.IO.File.Exists(filePath.FullPath))
{
System.IO.File.Delete(filePath.FullPath);
}
}
}

Expand All @@ -928,7 +955,10 @@ public void Should_Give_Correct_Result_For_Priority_After_Roundtrip()
}
finally
{
System.IO.File.Delete(filePath.FullPath);
if (System.IO.File.Exists(filePath.FullPath))
{
System.IO.File.Delete(filePath.FullPath);
}
}
}

Expand All @@ -955,7 +985,10 @@ public void Should_Give_Correct_Result_For_PriorityName_After_Roundtrip()
}
finally
{
System.IO.File.Delete(filePath.FullPath);
if (System.IO.File.Exists(filePath.FullPath))
{
System.IO.File.Delete(filePath.FullPath);
}
}
}

Expand All @@ -982,7 +1015,10 @@ public void Should_Give_Correct_Result_For_Rule_After_Roundtrip()
}
finally
{
System.IO.File.Delete(filePath.FullPath);
if (System.IO.File.Exists(filePath.FullPath))
{
System.IO.File.Delete(filePath.FullPath);
}
}
}

Expand All @@ -1009,7 +1045,10 @@ public void Should_Give_Correct_Result_For_RuleUrl_After_Roundtrip()
}
finally
{
System.IO.File.Delete(filePath.FullPath);
if (System.IO.File.Exists(filePath.FullPath))
{
System.IO.File.Delete(filePath.FullPath);
}
}
}
}
Expand Down Expand Up @@ -1075,7 +1114,10 @@ public void Should_Give_Correct_Result_For_MessageText_After_Roundtrip()
}
finally
{
System.IO.File.Delete(filePath.FullPath);
if (System.IO.File.Exists(filePath.FullPath))
{
System.IO.File.Delete(filePath.FullPath);
}
}
}

Expand Down Expand Up @@ -1112,7 +1154,10 @@ public void Should_Give_Correct_Result_For_MessageMarkdown_After_Roundtrip()
}
finally
{
System.IO.File.Delete(filePath.FullPath);
if (System.IO.File.Exists(filePath.FullPath))
{
System.IO.File.Delete(filePath.FullPath);
}
}
}

Expand Down Expand Up @@ -1149,7 +1194,10 @@ public void Should_Give_Correct_Result_For_MessageHtml_After_Roundtrip()
}
finally
{
System.IO.File.Delete(filePath.FullPath);
if (System.IO.File.Exists(filePath.FullPath))
{
System.IO.File.Delete(filePath.FullPath);
}
}
}

Expand Down Expand Up @@ -1184,7 +1232,10 @@ public void Should_Give_Correct_Result_For_ProviderType_After_Roundtrip()
}
finally
{
System.IO.File.Delete(filePath.FullPath);
if (System.IO.File.Exists(filePath.FullPath))
{
System.IO.File.Delete(filePath.FullPath);
}
}
}

Expand Down Expand Up @@ -1219,7 +1270,10 @@ public void Should_Give_Correct_Result_For_ProviderName_After_Roundtrip()
}
finally
{
System.IO.File.Delete(filePath.FullPath);
if (System.IO.File.Exists(filePath.FullPath))
{
System.IO.File.Delete(filePath.FullPath);
}
}
}

Expand Down Expand Up @@ -1256,7 +1310,10 @@ public void Should_Give_Correct_Result_For_ProjectFileRelativePath_After_Roundtr
}
finally
{
System.IO.File.Delete(filePath.FullPath);
if (System.IO.File.Exists(filePath.FullPath))
{
System.IO.File.Delete(filePath.FullPath);
}
}
}

Expand Down Expand Up @@ -1293,7 +1350,10 @@ public void Should_Give_Correct_Result_For_ProjectName_After_Roundtrip()
}
finally
{
System.IO.File.Delete(filePath.FullPath);
if (System.IO.File.Exists(filePath.FullPath))
{
System.IO.File.Delete(filePath.FullPath);
}
}
}

Expand Down Expand Up @@ -1330,7 +1390,10 @@ public void Should_Give_Correct_Result_For_AffectedFileRelativePath_After_Roundt
}
finally
{
System.IO.File.Delete(filePath.FullPath);
if (System.IO.File.Exists(filePath.FullPath))
{
System.IO.File.Delete(filePath.FullPath);
}
}
}

Expand Down Expand Up @@ -1367,7 +1430,10 @@ public void Should_Give_Correct_Result_For_Line_After_Roundtrip()
}
finally
{
System.IO.File.Delete(filePath.FullPath);
if (System.IO.File.Exists(filePath.FullPath))
{
System.IO.File.Delete(filePath.FullPath);
}
}
}

Expand Down Expand Up @@ -1404,7 +1470,10 @@ public void Should_Give_Correct_Result_For_Priority_After_Roundtrip()
}
finally
{
System.IO.File.Delete(filePath.FullPath);
if (System.IO.File.Exists(filePath.FullPath))
{
System.IO.File.Delete(filePath.FullPath);
}
}
}

Expand Down Expand Up @@ -1441,7 +1510,10 @@ public void Should_Give_Correct_Result_For_PriorityName_After_Roundtrip()
}
finally
{
System.IO.File.Delete(filePath.FullPath);
if (System.IO.File.Exists(filePath.FullPath))
{
System.IO.File.Delete(filePath.FullPath);
}
}
}

Expand Down Expand Up @@ -1478,7 +1550,10 @@ public void Should_Give_Correct_Result_For_Rule_After_Roundtrip()
}
finally
{
System.IO.File.Delete(filePath.FullPath);
if (System.IO.File.Exists(filePath.FullPath))
{
System.IO.File.Delete(filePath.FullPath);
}
}
}

Expand Down Expand Up @@ -1515,7 +1590,10 @@ public void Should_Give_Correct_Result_For_RuleUrl_After_Roundtrip()
}
finally
{
System.IO.File.Delete(filePath.FullPath);
if (System.IO.File.Exists(filePath.FullPath))
{
System.IO.File.Delete(filePath.FullPath);
}
}
}
}
Expand Down

0 comments on commit 832e5c7

Please sign in to comment.