private static void HeavyPillExceptionWrongExecutionPathTest() { HeavyPill hp = new HeavyPill(); Exception ext = Record.Exception(() => hp.GetHeavyBottle()); Assert.IsType <InvalidProgramException>(ext); }
private static void HeavyPillTest(double normalWeight, double specialWeight, int bottles, int heavyBottle) { HeavyPill hp = new HeavyPill(); hp.SetHeavyPillProblem(new Pill(normalWeight, specialWeight), bottles, heavyBottle); Assert.Equal(heavyBottle, hp.GetHeavyBottle()); }