public void PowerConfigurationProcessクラスのSetActiveメソッドが実行されること() { var mock = new Mock<PowerConfigurationProcess.Interface>(); var input = new PowerPlan(); var target = new PowerConfiguration(); target.PowerConfigurationProcess = mock.Object; target.SetActive(input); mock.Verify(x => x.SetActive(input), Times.Once); mock.VerifyAll(); }
public void PowerConfigurationProcessクラスのGetPowerPlansメソッドが実行されること() { var expected = new PowerPlan[] { new PowerPlan(), new PowerPlan(), }; var mock = new Mock<PowerConfigurationProcess.Interface>(); mock.Setup(x => x.GetPowerPlans()).Returns(expected); var target = new PowerConfiguration(); target.PowerConfigurationProcess = mock.Object; var actuals = target.GetPowerPlans(); CollectionAssert.AreEqual(expected, actuals); mock.Verify(x => x.GetPowerPlans(), Times.Once); mock.VerifyAll(); }