Skip to content

Commit

Permalink
xunit error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
taori committed Aug 16, 2024
1 parent 7dfa03f commit a64f54d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ namespace Amusoft.DotnetNew.Tests.UnitTests.Tests;
public class CrossPlatformPathTests : TestBase
{

[Fact(Timeout = 10000)]
[Fact]
public void OriginalPathEquals()
{
var a = new CrossPlatformPath(Path.GetTempPath());
var b = new CrossPlatformPath(Path.GetTempPath());
a.OriginalPath.Equals(b.OriginalPath).ShouldBeTrue();
}

[Fact(Timeout = 10000)]
[Fact]
public void CrossPlatformPathEquals()
{
var a = new CrossPlatformPath(Path.GetTempPath());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace Amusoft.DotnetNew.Tests.UnitTests.Tests;

public class PathTranslatorTests : TestBase
{
[Theory(Timeout = 10000)]
[Theory]
[InlineData(@"D:\a\b",@"D:\a\c",@"../c")]
[InlineData(@"D:\a\b\c.txt",@"D:\a\c",@"../../c")]
[InlineData(@"D:\a\b",@"D:\a\d",@"../d")]
Expand All @@ -25,7 +25,7 @@ public void RelativePath(string refDirectory, string absolutePath, string expect
//C:\Users\A\AppData\Local\Temp\bf129b466576486fb0bfbb43d5f28b49
}

[Theory(Timeout = 10000)]
[Theory]
[InlineData(@"C:\Users\A\AppData\Local\Temp\bf129b466576486fb0bfbb43d5f28b49",@"src/All.sln",@"C:/Users/A/AppData/Local/Temp/bf129b466576486fb0bfbb43d5f28b49/src/All.sln")]
[InlineData(@"C:\Users\A\AppData\Local\Temp\bf129b466576486fb0bfbb43d5f28b49",@"../src/All.sln",@"C:/Users/A/AppData/Local/Temp/src/All.sln")]
public void AbsolutePath(string refpath, string relPath, string expected)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace Amusoft.DotnetNew.Tests.UnitTests.Tests;
public class TempDirectoryTests : TestBase
{

[Fact(Timeout = 10000)]
[Fact]
public void DirectoryExists()
{
using (var dir = new TempDirectory())
Expand All @@ -20,7 +20,7 @@ public void DirectoryExists()
}
}

[Fact(Timeout = 10000)]
[Fact]
public void DeletedAfterScope()
{
var path = string.Empty;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ namespace Amusoft.DotnetNew.Tests.UnitTests.Tests
public class TemplateSolutionInstallerTests : TestBase
{

[Fact(Timeout = 10000)]
[Fact]
public void SearchingWorks()
{
var file = TemplateSolutionInstallerHelper.CreateLocalSolution();
File.Exists(file.Solution.File.OriginalPath).ShouldBeTrue();
Directory.Exists(file.Solution.Directory.OriginalPath).ShouldBeTrue();
}

[Fact(Timeout = 10000)]
[Fact]
public void GetAbsolutePathWorks()
{
var file = TemplateSolutionInstallerHelper.CreateLocalSolution();
Expand Down

0 comments on commit a64f54d

Please sign in to comment.