public void ToStochastConfiguration_DistributionNull_ThrowsArgumentNullException() { // Setup IDistribution distribution = null; // Call TestDelegate test = () => distribution.ToStochastConfiguration(); // Assert var exception = Assert.Throws <ArgumentNullException>(test); Assert.AreEqual("distribution", exception.ParamName); }