/// <summary> /// 演奏します。 /// </summary> /// <param name="dynamics">強弱</param> public void Play(string dynamics) { switch (dynamics) { case "pp": _currentPlay = new Dynamics.Pianissimo(); break; case "p": _currentPlay = new Dynamics.Piano(); break; case "f": _currentPlay = new Dynamics.Forte(); break; case "ff": _currentPlay = new Dynamics.Fortessimo(); break; default: //他の強弱記号あるけど、めんどくさいので省略 break; } _currentPlay.Play(); }
private void IPlayBaseTest(IPlay device, string expectedResult, FakeOutput output) { //-- Act device.Play(new Track()); //-- Assert Assert.AreEqual(output.Result, expectedResult); }
public void Play() { if (m_advertisement != null) { m_advertisement.ShowAdvertisement(); m_player.Play(); } }
public void Play() { if (m_copyRightMark != null) { m_copyRightMark.ShowCopyRight(); m_player.Play(); } }
public void ExternalSpeakerTest() { output = new FakeOutput(); device = new ExternalSpeaker(new RealSpeaker(2), 20, output); expectedMessage = $"{nameof(ExternalSpeaker)} sound"; //-- Act device.Play(new Track()); //-- Assert Assert.AreEqual(output.Result, expectedMessage); }
public void SamsungHeadsetTest() { output = new FakeOutput(); device = new SamsungHeadset(new RealSpeaker(2), new RealSpeaker(2), 20, output); expectedMessage = $"{nameof(SamsungHeadset)} sound"; //-- Act device.Play(new Track()); //-- Assert Assert.AreEqual(output.Result, expectedMessage); }
private void button5_Click(object sender, EventArgs e) { label1.Text = ip.Play(); }
public string Category() { return(_play.Play()); }