Esempio n. 1
0
 public void AllEmpty()
 {
     Assert.Throws <ArgumentNullException>(() => ImmutableArrayExtensions.All(empty, null));
     Assert.True(ImmutableArrayExtensions.All(empty, n => { Assert.True(false); return(false); })); // predicate should never be invoked.
 }
Esempio n. 2
0
 public void AllEmptyDefault()
 {
     Assert.Throws <NullReferenceException>(() => ImmutableArrayExtensions.All(emptyDefault, n => true));
     Assert.Throws <NullReferenceException>(() => ImmutableArrayExtensions.All(emptyDefault, null));
 }
 public void AllEmpty()
 {
     AssertExtensions.Throws <ArgumentNullException>("predicate", () => ImmutableArrayExtensions.All(s_empty, null));
     Assert.True(ImmutableArrayExtensions.All(s_empty, n => { throw new ShouldNotBeInvokedException(); })); // predicate should never be invoked.
 }
Esempio n. 4
0
 public void All()
 {
     Assert.Throws <ArgumentNullException>(() => ImmutableArrayExtensions.All(oneElement, null));
     Assert.False(ImmutableArrayExtensions.All(manyElements, n => n == 2));
     Assert.True(ImmutableArrayExtensions.All(manyElements, n => n > 0));
 }
 public void AllEmptyDefault()
 {
     TestExtensionsMethods.ValidateDefaultThisBehavior(() => ImmutableArrayExtensions.All(s_emptyDefault, n => true));
     TestExtensionsMethods.ValidateDefaultThisBehavior(() => ImmutableArrayExtensions.All(s_emptyDefault, null));
 }