This repository has been archived by the owner on Mar 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
80 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
namespace KoeBook.Core.Models; | ||
|
||
public record SoundModel( | ||
string name, | ||
IReadOnlyList<string> styles); |
22 changes: 22 additions & 0 deletions
22
KoeBook.Core/Services/Mocks/SoundGenerationSelectorServiceMock.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using KoeBook.Core.Contracts.Services; | ||
using KoeBook.Core.Models; | ||
|
||
namespace KoeBook.Core.Services.Mocks; | ||
|
||
internal class SoundGenerationSelectorServiceMock : ISoundGenerationSelectorService | ||
{ | ||
public IReadOnlyList<SoundModel> Models { get; private set; } = []; | ||
|
||
public async ValueTask InitializeAsync(CancellationToken cancellationToken) | ||
{ | ||
await Task.Delay(1000, cancellationToken).ConfigureAwait(false); | ||
Models = [ | ||
new SoundModel("青年1", ["neutral", "laughing", "happy", "sad", "cry", "surprised", "angry"]), | ||
new SoundModel("青年2", ["neutral", "laughing", "happy", "sad", "cry", "surprised", "angry"]), | ||
new SoundModel("女性1", ["neutral", "laughing", "happy", "sad", "cry", "surprised", "angry"]), | ||
new SoundModel("女性2", ["neutral", "laughing", "happy", "sad", "cry", "surprised", "angry"]), | ||
new SoundModel("ナレーション (男性)", ["narration"]), | ||
new SoundModel("ナレーション (女性)", ["narration"]), | ||
]; | ||
} | ||
} |
9 changes: 5 additions & 4 deletions
9
...cts/Services/Mocks/SoundGenerationMock.cs → ...vices/Mocks/SoundGenerationServiceMock.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 0 additions & 18 deletions
18
KoeBook/Contracts/Services/Mocks/SoundGenerationSelectorServiceMock.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace KoeBook.Models; | ||
|
||
internal class MockOptions | ||
{ | ||
public bool? ISoundGenerationSelectorService { get; set; } | ||
|
||
public bool? ISoundGenerationService { get; set; } | ||
} |
19 changes: 19 additions & 0 deletions
19
KoeBook/Services/CoreMocks/SoundGenerationSelectorServiceMock.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using KoeBook.Core.Contracts.Services; | ||
using KoeBook.Core.Models; | ||
|
||
namespace KoeBook.Core.Services.Mocks; | ||
|
||
internal class SoundGenerationSelectorServiceMock : ISoundGenerationSelectorService | ||
{ | ||
public IReadOnlyList<SoundModel> Models { get; private set; } = []; | ||
|
||
public async ValueTask InitializeAsync(CancellationToken cancellationToken) | ||
{ | ||
await Task.Delay(1000, cancellationToken).ConfigureAwait(false); | ||
Models = [ | ||
new SoundModel("青年1", ["neutral", "laughing", "happy", "sad", "cry", "surprised", "angry"]), | ||
new SoundModel("青年2", ["neutral", "laughing", "happy", "sad", "cry", "surprised", "angry"]), | ||
new SoundModel("王", ["narration", "neutral", "laughing", "happy", "sad", "cry", "surprised", "angry"]), | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
{ | ||
{ | ||
"LocalSettingsOptions": { | ||
"ApplicationDataFolder": "KoeBook/ApplicationData", | ||
"LocalSettingsFile": "LocalSettings.json" | ||
"ApplicationDataFolder": "KoeBook/ApplicationData", | ||
"LocalSettingsFile": "LocalSettings.json" | ||
}, | ||
"MockOptions": { | ||
"ISoundGenerationSelectorService": false, | ||
"ISoundGenerationService": false | ||
} | ||
} |