public void EmptyStopsAreParsedCorrectly() { var parser = new SmParser(x => 180); var actual = parser.LoadFromFile("files/SM/empty_stops.sm").Tempo.Interruptions.ToArray(); actual.Length.ShouldBe(0); }
public void ChartsAreParsedCorrectly() { var parser = new SmParser(x => 180); var actual = parser.LoadFromFile("files/SM/chart_definitions.sm").Charts; actual.Count.ShouldBe(2); actual.First().Type.ShouldBe(StepChartType.Single); actual.First().DescriptionOrAuthor.ShouldBe("single chart"); actual.First().DifficultyRating.Difficulty.ShouldBe(Difficulty.Easy); actual.First().DifficultyRating.Meter.ShouldBe(1); actual.First().DifficultyRating.Radar.Stream.ShouldBe(0.1); actual.First().DifficultyRating.Radar.Voltage.ShouldBe(0.2); actual.First().DifficultyRating.Radar.Air.ShouldBe(0.3); actual.First().DifficultyRating.Radar.Freeze.ShouldBe(0.4); actual.First().DifficultyRating.Radar.Chaos.ShouldBe(0.5); actual.Last().Type.ShouldBe(StepChartType.Double); actual.Last().DescriptionOrAuthor.ShouldBe("double chart"); actual.Last().DifficultyRating.Difficulty.ShouldBe(Difficulty.Medium); actual.Last().DifficultyRating.Meter.ShouldBe(2); actual.Last().DifficultyRating.Radar.Stream.ShouldBe(0.5); actual.Last().DifficultyRating.Radar.Voltage.ShouldBe(0.4); actual.Last().DifficultyRating.Radar.Air.ShouldBe(0.3); actual.Last().DifficultyRating.Radar.Freeze.ShouldBe(0.2); actual.Last().DifficultyRating.Radar.Chaos.ShouldBe(0.1); }
public void StopsAreParsedCorrectly() { var parser = new SmParser(x => 180); var actual = parser.LoadFromFile("files/SM/bpm_changes_and_stops.sm").Tempo.Interruptions.ToArray(); actual.Length.ShouldBe(3); actual.Select(x => x.Time).ShouldBe(new[] { 1.0, 3.0, 5.0 }); actual.Select(x => x.Duration).ShouldBe(new[] { 2.0, 4.0, 6.0 }); }