public void Test_rhythm_with_providing_alt_layer() { rhythm.AddLayer("So"); rhythm.Length = 10; rhythm.AddAltLayerProvider(0, segment => { if (segment == 2 || segment == 5) { return("PP"); } if (segment == 8) { return("ZZ"); } return(null); }); rhythm.GetRhythm().First().Should().Be("SoSoPPSoSoPPSoSoZZSo"); }