Skip to content

Commit

Permalink
Fix the test broken in the previous PR.
Browse files Browse the repository at this point in the history
  • Loading branch information
andy840119 committed Dec 8, 2024
1 parent 2a45783 commit b165c40
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public void TestClassicStageInfoSerializer()
var stageInfo = new ClassicStageInfo();

const string expected =
"{\"$type\":\"classic\",\"style_category\":{},\"stage_definition\":{\"border_width\":25.0,\"border_height\":25.0,\"fade_in_time\":150.0,\"fade_out_time\":150.0,\"fade_in_easing\":22,\"fade_out_easing\":22,\"lyric_scale\":2.0,\"line_height\":72.0,\"first_lyric_start_time_offset\":1000.0,\"lyric_end_time_offset\":300.0,\"last_lyric_end_time_offset\":10000.0},\"lyric_layout_category\":{},\"lyric_timing_info\":{\"timings\":[],\"mappings\":{}}}";
"{\"$type\":\"classic\",\"stage_definition\":{\"border_width\":25.0,\"border_height\":25.0,\"fade_in_time\":150.0,\"fade_out_time\":150.0,\"fade_in_easing\":22,\"fade_out_easing\":22,\"lyric_scale\":2.0,\"line_height\":72.0,\"first_lyric_start_time_offset\":1000.0,\"lyric_end_time_offset\":300.0,\"last_lyric_end_time_offset\":10000.0},\"style_category\":{},\"lyric_layout_category\":{},\"lyric_timing_info\":{\"timings\":[],\"mappings\":{}}}";
string actual = JsonConvert.SerializeObject(stageInfo, CreateSettings());
Assert.AreEqual(expected, actual);
}
Expand All @@ -29,7 +29,7 @@ public void TestClassicStageInfoSerializer()
public void TestClassicStageInfoDeserializer()
{
const string json =
"{\"$type\":\"classic\",\"style_category\":{},\"stage_definition\":{\"border_width\":25.0,\"border_height\":25.0,\"fade_in_time\":150.0,\"fade_out_time\":150.0,\"fade_in_easing\":22,\"fade_out_easing\":22,\"lyric_scale\":2.0,\"line_height\":72.0,\"first_lyric_start_time_offset\":1000.0,\"lyric_end_time_offset\":300.0,\"last_lyric_end_time_offset\":10000.0},\"lyric_layout_category\":{},\"lyric_timing_info\":{\"timings\":[],\"mappings\":{}}}";
"{\"$type\":\"classic\",\"stage_definition\":{\"border_width\":25.0,\"border_height\":25.0,\"fade_in_time\":150.0,\"fade_out_time\":150.0,\"fade_in_easing\":22,\"fade_out_easing\":22,\"lyric_scale\":2.0,\"line_height\":72.0,\"first_lyric_start_time_offset\":1000.0,\"lyric_end_time_offset\":300.0,\"last_lyric_end_time_offset\":10000.0},\"style_category\":{},\"lyric_layout_category\":{},\"lyric_timing_info\":{\"timings\":[],\"mappings\":{}}}";

var expected = new ClassicStageInfo();
var actual = (ClassicStageInfo)JsonConvert.DeserializeObject<StageInfo>(json, CreateSettings())!;
Expand Down

0 comments on commit b165c40

Please sign in to comment.