Skip to content

Commit

Permalink
updated tests again
Browse files Browse the repository at this point in the history
  • Loading branch information
natekford committed Jan 25, 2024
1 parent 252cf38 commit 357b198
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/SongProcessor.Tests/FFmpeg/Jobs/Mp3SongJob_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ public async Task ProcessMp3Canceled_Test()
var job = GenerateJob(temp.Dir);
var cts = new CancellationTokenSource();

var task = job.ProcessAsync(cts.Token);
cts.Cancel();
var task = job.ProcessAsync(cts.Token);

var result = await task.ConfigureAwait(false);
result.IsSuccess.Should().BeNull();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ public async Task ProcessVideoCanceled_Test()
var job = GenerateJob(temp.Dir);
var cts = new CancellationTokenSource();

var task = job.ProcessAsync(cts.Token);
cts.Cancel();
var task = job.ProcessAsync(cts.Token);

var result = await task.ConfigureAwait(false);
result.IsSuccess.Should().BeNull();
Expand Down
5 changes: 3 additions & 2 deletions tests/SongProcessor.Tests/Models/Anime_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;

using SongProcessor.Models;
using SongProcessor.Utils;

namespace SongProcessor.Tests.Models;

Expand All @@ -26,7 +27,7 @@ public void ConstructorNullPath_Test()
[TestMethod]
public void CopyConstructor_Test()
{
var expected = new Anime(@"C:\anime.amq", new AnimeBase
var expected = new Anime(Path.Combine(ProcessUtils.Root, "anime.amq"), new AnimeBase
{
Id = 73,
Name = "Anime",
Expand All @@ -39,7 +40,7 @@ public void CopyConstructor_Test()
Type = SongType.Op.Create(1),
},
],
Source = @"C:\video.mkv",
Source = Path.Combine(ProcessUtils.Root, "video.mkv"),
Year = 1984,
}, null);
var actual = new Anime(expected);
Expand Down

0 comments on commit 357b198

Please sign in to comment.