public void TestDivideByZero(int x, int y) { var cs = new CalcService(); //var actualResult = cs.UnsafeDivide(x, y); Exception ex = Assert .Throws <DivideByZeroException>(() => cs.UnsafeDivide(x, y)); }