Test.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using NumberDLL;
  2. namespace Testing
  3. {
  4. [TestClass]
  5. public class Test
  6. {
  7. [TestMethod]
  8. public void AreEqual12345()
  9. {
  10. MethodClass obj = new MethodClass();
  11. int numb = 12345;
  12. int rez = 54321;
  13. int fact = obj.Razryad( numb);
  14. Assert.AreEqual(rez, fact);
  15. }
  16. [TestMethod]
  17. public void AreNotEqual159232()
  18. {
  19. MethodClass obj = new MethodClass();
  20. int numb = 59232;
  21. int rez = 23295;
  22. int fact = obj.Razryad( numb);
  23. Assert.AreEqual(rez, fact);
  24. }
  25. [TestMethod]
  26. public void IsTrue6520222()
  27. {
  28. MethodClass obj = new MethodClass();
  29. int numb = 6520222;
  30. int rez = 2220256;
  31. int fact = obj.Razryad( numb);
  32. Assert.IsTrue(rez == fact);
  33. }
  34. [TestMethod]
  35. public void IsFalse98632423()
  36. {
  37. MethodClass obj = new MethodClass();
  38. int numb = 98632423;
  39. int rez = 10;
  40. int fact = obj.Razryad( numb);
  41. Assert.IsFalse(rez == fact);
  42. }
  43. }
  44. }