public void All_WhenSatisfyCondition_ShouldNotThrowException() { var elements = new List <dynamic> { 1, 2, 3 }; Ensure.All(elements, (element) => element.GetType() == typeof(int)); }
public void All_WhenDontSatisfyCondition_ShouldThrowException() { var elements = new List <dynamic> { 1, 2, 3, "text" }; Assert.Throws <Exception>(() => { Ensure.All(elements, (element) => element.GetType() == typeof(int)); }); }