Skip to content

Commit

Permalink
現物合わせでTestを修正
Browse files Browse the repository at this point in the history
UserDictWordクラスよりも多くのmemberが返ってくるようになっているので、それに対応
classに対応するものだけを取得するでも良いかもしれない
  • Loading branch information
yamachu committed Feb 20, 2025
1 parent 6e9af14 commit e67492c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/VoicevoxCoreSharp.Core.Tests/UserDictTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ public void CreateDelete()

var result = userDict.ToJson(out var json);
Assert.Equal(ResultCode.RESULT_OK, result);
Assert.Equal($"{{\"{wordUuid}\":{{\"surface\":\"hoge\",\"pronunciation\":\"{pronunciation}\",\"accent_type\":{accentType},\"word_type\":\"ADJECTIVE\",\"priority\":{priority},\"mora_count\":2}}}}", json);
System.Console.Error.WriteLine(json);
var expectedJson = $"{{\"{wordUuid}\":{{\"surface\":\"hoge\",\"priority\":{priority},\"context_id\":20,\"part_of_speech\":\"形容詞\",\"part_of_speech_detail_1\":\"自立\",\"part_of_speech_detail_2\":\"*\",\"part_of_speech_detail_3\":\"*\",\"inflectional_type\":\"*\",\"inflectional_form\":\"*\",\"stem\":\"*\",\"yomi\":\"ホゲ\",\"pronunciation\":\"{pronunciation}\",\"accent_type\":{accentType},\"mora_count\":2,\"accent_associative_rule\":\"*\"}}}}";
Assert.Equal(expectedJson, json);

var removeResult = userDict.RemoveWord(wordUuid);
Assert.Equal(ResultCode.RESULT_OK, removeResult);
Expand Down

0 comments on commit e67492c

Please sign in to comment.