Пример #1
0
        private static void HeavyPillExceptionWrongExecutionPathTest()
        {
            HeavyPill hp  = new HeavyPill();
            Exception ext = Record.Exception(() => hp.GetHeavyBottle());

            Assert.IsType <InvalidProgramException>(ext);
        }
Пример #2
0
        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());
        }