Guest User

Untitled

a guest
Dec 12th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4.  
  5. using NUnit.Framework;
  6.  
  7. namespace Sample {
  8. [TestFixture]
  9. public class EnumerableTest {
  10. [Test]
  11. public void _2か3どちらかの倍数() {
  12. var count = Enumerable.Range(1, 10)
  13. .CountAny(
  14. i => i % 2 == 0,
  15. i => i % 3 == 0
  16. );
  17.  
  18. Assert.That(count, Is.EqualTo(7));
  19. }
  20. }
  21. }
Add Comment
Please, Sign In to add comment