Advertisement
Guest User

Untitled

a guest
Dec 17th, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. using NUnit.Framework;
  2.  
  3. public class KataTests
  4. {
  5. [Test]
  6. public void BasicTests()
  7. {
  8. var input = new int[] { 4, 3, 9, 7, 2, 1 };
  9. var expected = new int[] { 2, 9, 3, 49, 4, 1 };
  10. Assert.AreEqual(string.Join(",", expected), string.Join(",", Kata.SquareOrSquareRoot(input)));
  11.  
  12. input = new int[] { 100, 101, 5, 5, 1, 1 };
  13. expected = new int[] { 10, 10201, 25, 25, 1, 1};
  14. Assert.AreEqual(string.Join(",", expected), string.Join(",", Kata.SquareOrSquareRoot(input)));
  15.  
  16. input = new int[] { 1, 2, 3, 4, 5, 6 };
  17. expected = new int[] { 1, 4, 9, 2, 25, 36};
  18. Assert.AreEqual(string.Join(",", expected), string.Join(",", Kata.SquareOrSquareRoot(input)));
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement