From 5a3230f8883350d9b16df1043d9940a4e45d7439 Mon Sep 17 00:00:00 2001 From: NeoCoderMatrix86 <40752681+NeoCoderMatrix86@users.noreply.github.com> Date: Wed, 28 Aug 2024 15:23:01 +0200 Subject: [PATCH] Update CuesheetTests.cs --- .../Model/AudioCuesheet/CuesheetTests.cs | 25 +++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/AudioCuesheetEditorTests/Model/AudioCuesheet/CuesheetTests.cs b/AudioCuesheetEditorTests/Model/AudioCuesheet/CuesheetTests.cs index e8abb694..7b2c0210 100644 --- a/AudioCuesheetEditorTests/Model/AudioCuesheet/CuesheetTests.cs +++ b/AudioCuesheetEditorTests/Model/AudioCuesheet/CuesheetTests.cs @@ -16,7 +16,6 @@ using AudioCuesheetEditor.Data.Options; using AudioCuesheetEditor.Extensions; using AudioCuesheetEditor.Model.Entity; -using AudioCuesheetEditor.Model.IO; using AudioCuesheetEditor.Model.IO.Audio; using AudioCuesheetEditor.Model.IO.Import; using AudioCuesheetEditor.Model.Options; @@ -24,16 +23,12 @@ using AudioCuesheetEditor.Services.IO; using AudioCuesheetEditorTests.Properties; using AudioCuesheetEditorTests.Utility; -using Microsoft.JSInterop; using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using System; using System.Collections.Generic; -using System.Data; using System.IO; using System.Linq; -using System.Net.Http; -using System.Text; using System.Threading.Tasks; namespace AudioCuesheetEditor.Model.AudioCuesheet.Tests @@ -242,7 +237,15 @@ public async Task ImportTestAsync() var traceChangeManager = new TraceChangeManager(TestHelper.CreateLogger()); var sessionStateContainer = new SessionStateContainer(traceChangeManager); var localStorageOptionsProviderMock = new Mock(); - localStorageOptionsProviderMock.Setup(x => x.GetOptions()).ReturnsAsync(new ImportOptions()); + var importOptions = new ImportOptions + { + TextImportScheme = new TextImportScheme() + { + SchemeCuesheet = TextImportScheme.DefaultSchemeCuesheet, + SchemeTracks = TextImportScheme.DefaultSchemeTracks + } + }; + localStorageOptionsProviderMock.Setup(x => x.GetOptions()).ReturnsAsync(importOptions); var textImportService = new TextImportService(); var cuesheetImportService = new CuesheetImportService(); var importManager = new ImportManager(sessionStateContainer, localStorageOptionsProviderMock.Object, textImportService, cuesheetImportService); @@ -579,7 +582,15 @@ public async Task ImportSamplesTestAsync() var traceChangeManager = new TraceChangeManager(TestHelper.CreateLogger()); var sessionStateContainer = new SessionStateContainer(traceChangeManager); var localStorageOptionsProviderMock = new Mock(); - localStorageOptionsProviderMock.Setup(x => x.GetOptions()).ReturnsAsync(new ImportOptions()); + var importOptions = new ImportOptions + { + TextImportScheme = new TextImportScheme() + { + SchemeCuesheet = TextImportScheme.DefaultSchemeCuesheet, + SchemeTracks = TextImportScheme.DefaultSchemeTracks + } + }; + localStorageOptionsProviderMock.Setup(x => x.GetOptions()).ReturnsAsync(importOptions); var textImportService = new TextImportService(); var cuesheetImportService = new CuesheetImportService(); var importManager = new ImportManager(sessionStateContainer, localStorageOptionsProviderMock.Object, textImportService, cuesheetImportService);