Skip to content

Commit cf726c8

Browse files
Merge pull request #565 from NeoCoderMatrix86/development
Deploy v12.0
2 parents 2e29e02 + ef0b9f2 commit cf726c8

47 files changed

Lines changed: 328 additions & 1769 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

AudioCuesheetEditor.End2EndTests/Tests/Desktop/BasicTest.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ public async Task ChangeLanguage_ShouldSwitchLanguage_WhenGermanIsSelected()
6868
var detailView = new DetailView(TestPage);
6969
await detailView.GotoAsync();
7070
await bar.ChangeLanguageAsync("German (Germany)");
71-
await Expect(TestPage.GetByRole(AriaRole.Heading, new() { Name = "Abschnitte" })).ToBeVisibleAsync();
7271
await Expect(TestPage.GetByRole(AriaRole.Heading, new() { Name = "Allgemeine Informationen" })).ToBeVisibleAsync();
7372
await Expect(TestPage.GetByText("Aufnahmeansicht")).ToBeVisibleAsync();
7473
await Expect(TestPage.GetByRole(AriaRole.Heading, new() { Name = "Titel" })).ToBeVisibleAsync();
@@ -79,7 +78,7 @@ public async Task ChangeLanguage_ShouldSwitchLanguage_WhenGermanIsSelected()
7978
await Expect(TestPage.Locator("#app")).ToMatchAriaSnapshotAsync("- paragraph: Künstler\n- paragraph: Titel\n- paragraph: Audiodatei\n- paragraph: CDTextdatei\n- paragraph: Katalognummer\n- paragraph: Datum\n- paragraph: Datum & Uhrzeit\n- paragraph: Uhrzeit");
8079
await TestPage.GetByText("CDTextdatei").ClickAsync();
8180
await exportDialog.OpenSchemeMenuAsync("Schema Titel");
82-
await Expect(TestPage.Locator("#app")).ToMatchAriaSnapshotAsync("- paragraph: Position\n- paragraph: Künstler\n- paragraph: Titel\n- paragraph: Beginn\n- paragraph: Ende\n- paragraph: Länge\n- paragraph: Markierungen\n- paragraph: Vorlücke\n- paragraph: Nachlücke");
81+
await Expect(TestPage.GetByTestId("menu-wrapper")).ToMatchAriaSnapshotAsync("- paragraph: Position\n- paragraph: Künstler\n- paragraph: Titel\n- paragraph: Begin\n- paragraph: End\n- paragraph: Länge\n- paragraph: Markierungen\n- paragraph: Vorlücke\n- paragraph: Nachlücke");
8382
}
8483

8584
[TestMethod]

AudioCuesheetEditor.End2EndTests/Tests/Desktop/ExportTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public async Task DownloadProject_GeneratesProjectFile_WhenCuesheetIsValidAsync(
6868
using var stream = await download.CreateReadStreamAsync();
6969
using var reader = new StreamReader(stream);
7070
var content = await reader.ReadToEndAsync(TestContext.CancellationToken);
71-
Assert.AreEqual("{\"Tracks\":[{\"Position\":1,\"Artist\":\"Track Artist 1\",\"Title\":\"Track Title 1\",\"Begin\":\"00:00:00\",\"End\":\"00:05:48\",\"Flags\":[],\"IsLinkedToPreviousTrack\":true}],\"Artist\":\"Cuesheet Artist 1\",\"Title\":\"Cuesheet Title 1\",\"Audiofile\":{\"Name\":\"Kalimba.mp3\",\"Duration\":\"00:05:48\",\"AudioCodec\":{\"MimeType\":\"audio/mpeg\",\"FileExtension\":\".mp3\",\"Name\":\"AudioCodec MP3\"}},\"Sections\":[]}", content);
71+
Assert.AreEqual("{\"Tracks\":[{\"Position\":1,\"Artist\":\"Track Artist 1\",\"Title\":\"Track Title 1\",\"Begin\":\"00:00:00\",\"End\":\"00:05:48.0608330\",\"Flags\":[],\"IsLinkedToPreviousTrack\":true}],\"Artist\":\"Cuesheet Artist 1\",\"Title\":\"Cuesheet Title 1\",\"Audiofile\":{\"Name\":\"Kalimba.mp3\",\"Duration\":\"00:05:48.0608330\",\"AudioCodec\":{\"MimeType\":\"audio/mpeg\",\"FileExtension\":\".mp3\",\"Name\":\"AudioCodec MP3\"}}}", content);
7272
}
7373

7474
[TestMethod]

AudioCuesheetEditor.End2EndTests/Tests/Smartphone/BasicTestSmartphone.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ public async Task ChangeLanguage_ShouldSwitchLanguage_WhenGermanIsSelected()
7070
var detailView = new DetailView(TestPage);
7171
await detailView.GotoAsync();
7272
await bar.ChangeLanguageAsync("German (Germany)");
73-
await Expect(TestPage.GetByRole(AriaRole.Heading, new() { Name = "Abschnitte" })).ToBeVisibleAsync();
7473
await Expect(TestPage.GetByRole(AriaRole.Heading, new() { Name = "Allgemeine Informationen" })).ToBeVisibleAsync();
7574
await Expect(TestPage.GetByText("Aufnahmeansicht")).ToBeVisibleAsync();
7675
await Expect(TestPage.GetByRole(AriaRole.Heading, new() { Name = "Titel" })).ToBeVisibleAsync();
@@ -81,7 +80,7 @@ public async Task ChangeLanguage_ShouldSwitchLanguage_WhenGermanIsSelected()
8180
await Expect(TestPage.Locator("#app")).ToMatchAriaSnapshotAsync("- paragraph: Künstler\n- paragraph: Titel\n- paragraph: Audiodatei\n- paragraph: CDTextdatei\n- paragraph: Katalognummer\n- paragraph: Datum\n- paragraph: Datum & Uhrzeit\n- paragraph: Uhrzeit");
8281
await TestPage.GetByText("CDTextdatei").ClickAsync();
8382
await exportDialog.OpenSchemeMenuAsync("Schema Titel");
84-
await Expect(TestPage.Locator("#app")).ToMatchAriaSnapshotAsync("- paragraph: Position\n- paragraph: Künstler\n- paragraph: Titel\n- paragraph: Beginn\n- paragraph: Ende\n- paragraph: Länge\n- paragraph: Markierungen\n- paragraph: Vorlücke\n- paragraph: Nachlücke");
83+
await Expect(TestPage.GetByTestId("menu-wrapper")).ToMatchAriaSnapshotAsync("- paragraph: Position\n- paragraph: Künstler\n- paragraph: Titel\n- paragraph: Begin\n- paragraph: End\n- paragraph: Länge\n- paragraph: Markierungen\n- paragraph: Vorlücke\n- paragraph: Nachlücke");
8584
}
8685

8786
[TestMethod]

AudioCuesheetEditor.End2EndTests/Tests/Smartphone/ExportTestSmartphone.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public async Task DownloadProject_GeneratesProjectFile_WhenCuesheetIsValidAsync(
6868
using var stream = await download.CreateReadStreamAsync();
6969
using var reader = new StreamReader(stream);
7070
var content = await reader.ReadToEndAsync(TestContext.CancellationToken);
71-
Assert.AreEqual("{\"Tracks\":[{\"Position\":1,\"Artist\":\"Track Artist 1\",\"Title\":\"Track Title 1\",\"Begin\":\"00:00:00\",\"End\":\"00:05:48\",\"Flags\":[],\"IsLinkedToPreviousTrack\":true}],\"Artist\":\"Cuesheet Artist 1\",\"Title\":\"Cuesheet Title 1\",\"Audiofile\":{\"Name\":\"Kalimba.mp3\",\"Duration\":\"00:05:48\",\"AudioCodec\":{\"MimeType\":\"audio/mpeg\",\"FileExtension\":\".mp3\",\"Name\":\"AudioCodec MP3\"}},\"Sections\":[]}", content);
71+
Assert.AreEqual("{\"Tracks\":[{\"Position\":1,\"Artist\":\"Track Artist 1\",\"Title\":\"Track Title 1\",\"Begin\":\"00:00:00\",\"End\":\"00:05:48.0608330\",\"Flags\":[],\"IsLinkedToPreviousTrack\":true}],\"Artist\":\"Cuesheet Artist 1\",\"Title\":\"Cuesheet Title 1\",\"Audiofile\":{\"Name\":\"Kalimba.mp3\",\"Duration\":\"00:05:48.0608330\",\"AudioCodec\":{\"MimeType\":\"audio/mpeg\",\"FileExtension\":\".mp3\",\"Name\":\"AudioCodec MP3\"}}}", content);
7272
}
7373

7474
[TestMethod]

AudioCuesheetEditor.Tests/AudioCuesheetEditor.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
<ItemGroup>
1414
<PackageReference Include="Moq" Version="4.20.72" />
15-
<PackageReference Include="coverlet.collector" Version="8.0.0">
15+
<PackageReference Include="coverlet.collector" Version="8.0.1">
1616
<PrivateAssets>all</PrivateAssets>
1717
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1818
</PackageReference>

AudioCuesheetEditor.Tests/Model/AudioCuesheet/CuesheetTests.cs

Lines changed: 2 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
using AudioCuesheetEditor.Model.AudioCuesheet;
1717
using AudioCuesheetEditor.Model.Entity;
1818
using AudioCuesheetEditor.Model.IO.Audio;
19-
using AudioCuesheetEditor.Model.IO.Export;
2019
using AudioCuesheetEditor.Tests.Utility;
2120
using Microsoft.VisualStudio.TestTools.UnitTesting;
2221
using Moq;
@@ -414,96 +413,6 @@ public void IsRecordingPossible_WhenNoErrors_ReturnsEmpty()
414413
Assert.IsEmpty(errors);
415414
}
416415

417-
[TestMethod]
418-
public void AddSection_WithValidData_FiresEvents()
419-
{
420-
// Arrange
421-
var cuesheet = new Cuesheet();
422-
bool eventFired = false;
423-
cuesheet.TraceablePropertyChanged += (sender, args) =>
424-
{
425-
if (args.TraceableChange.PropertyName == nameof(Cuesheet.Sections))
426-
{
427-
eventFired = true;
428-
}
429-
};
430-
431-
// Act
432-
var section = cuesheet.AddSection();
433-
434-
// Assert
435-
Assert.IsTrue(eventFired);
436-
Assert.IsNotNull(section);
437-
Assert.HasCount(1, cuesheet.Sections);
438-
Assert.AreEqual(cuesheet, section.Cuesheet);
439-
}
440-
441-
[TestMethod()]
442-
public void RemoveSections_RemovesSpecifiedSections()
443-
{
444-
// Arrange
445-
var cuesheet = new Cuesheet();
446-
var section1 = cuesheet.AddSection();
447-
var section2 = cuesheet.AddSection();
448-
var section3 = cuesheet.AddSection();
449-
var sectionsToRemove = new List<CuesheetSection> { section1, section3 };
450-
bool eventFired = false;
451-
cuesheet.TraceablePropertyChanged += (sender, args) =>
452-
{
453-
if (args.TraceableChange.PropertyName == nameof(Cuesheet.Sections))
454-
{
455-
eventFired = true;
456-
}
457-
};
458-
459-
// Act
460-
cuesheet.RemoveSections(sectionsToRemove);
461-
462-
// Assert
463-
Assert.IsTrue(eventFired);
464-
Assert.HasCount(1, cuesheet.Sections);
465-
Assert.IsTrue(cuesheet.Sections.Contains(section2));
466-
Assert.IsFalse(cuesheet.Sections.Contains(section1));
467-
Assert.IsFalse(cuesheet.Sections.Contains(section3));
468-
}
469-
470-
[TestMethod()]
471-
public void GetSection_ReturnsCorrectSection()
472-
{
473-
// Arrange
474-
var cuesheet = new Cuesheet();
475-
var section1 = cuesheet.AddSection();
476-
section1.Begin = TimeSpan.Zero;
477-
section1.End = TimeSpan.FromSeconds(120);
478-
cuesheet.AddSection();
479-
var track = new Track { Begin = TimeSpan.Zero, End = TimeSpan.FromSeconds(83) };
480-
cuesheet.AddTrack(track);
481-
482-
// Act
483-
var result = cuesheet.GetSection(track);
484-
485-
// Assert
486-
Assert.AreEqual(section1, result);
487-
}
488-
489-
[TestMethod()]
490-
public void GetSection_ReturnsNullIfNoMatchingSection()
491-
{
492-
// Arrange
493-
var cuesheet = new Cuesheet();
494-
var section1 = cuesheet.AddSection();
495-
section1.Begin = TimeSpan.Zero;
496-
section1.End = TimeSpan.FromHours(1.5);
497-
var track = new Track { Begin = section1.End + TimeSpan.FromSeconds(1), End = section1.End + TimeSpan.FromSeconds(2) };
498-
cuesheet.AddTrack(track);
499-
500-
// Act
501-
var result = cuesheet.GetSection(track);
502-
503-
// Assert
504-
Assert.IsNull(result);
505-
}
506-
507416
[TestMethod]
508417
public void MoveTracksPossible_ShouldReturnFalse_WhenNoTracksToMove()
509418
{
@@ -764,12 +673,9 @@ public void StartRecording_WithAudiofile_ShouldStartRecording()
764673
public void RecalculateLastTrackEnd_SingleTrackWithAudiofile_EndSetToAudiofileDuration()
765674
{
766675
// Arrange
767-
var audiofileMock = new Mock<IAudiofile>();
768-
audiofileMock.SetupGet(a => a.Duration).Returns(TimeSpan.FromMinutes(5));
769-
770676
var cuesheet = new Cuesheet
771677
{
772-
Audiofile = audiofileMock.Object
678+
Audiofile = new("Test.mp3", nameof(RecalculateLastTrackEnd_SingleTrackWithAudiofile_EndSetToAudiofileDuration), new AudioCodec("audio/mpeg", ".mp3", "AudioCodec MP3"), TimeSpan.FromMinutes(5))
773679
};
774680
var track = new Track { Position = 1, Begin = TimeSpan.Zero };
775681
cuesheet.AddTrack(track);
@@ -803,12 +709,9 @@ public void RecalculateLastTrackEnd_MultipleTracks_EndSetCorrectly()
803709
public void RecalculateLastTrackEnd_MultipleTracksWithAudiofile_LastTrackEndSetToAudiofileDuration()
804710
{
805711
// Arrange
806-
var audiofileMock = new Mock<IAudiofile>();
807-
audiofileMock.SetupGet(a => a.Duration).Returns(TimeSpan.FromMinutes(5));
808-
809712
var cuesheet = new Cuesheet
810713
{
811-
Audiofile = audiofileMock.Object
714+
Audiofile = new("Test.mp3", nameof(RecalculateLastTrackEnd_SingleTrackWithAudiofile_EndSetToAudiofileDuration), new AudioCodec("audio/mpeg", ".mp3", "AudioCodec MP3"), TimeSpan.FromMinutes(5))
812715
};
813716
var track1 = new Track { Position = 1, Begin = TimeSpan.Zero, End = TimeSpan.FromMinutes(2) };
814717
var track2 = new Track { Position = 2, Begin = TimeSpan.FromMinutes(2) };

AudioCuesheetEditor.Tests/Model/IO/Audio/AudiofileTests.cs

Lines changed: 0 additions & 48 deletions
This file was deleted.

0 commit comments

Comments
 (0)