UnitTest1.cs 823 B

123456789101112131415161718192021222324252627
  1. using DemoExam;
  2. using DemoExam.Model;
  3. using Microsoft.VisualStudio.TestTools.UnitTesting;
  4. using System;
  5. using System.Collections.Generic;
  6. namespace UnitTestProject
  7. {
  8. [TestClass]
  9. public class UnitTest1
  10. {
  11. [TestMethod]
  12. public void CheckStatisticsCalculator1()
  13. {
  14. StatisticsCalculator statisticsCalculator = new StatisticsCalculator();
  15. List<Requests> requests = new List<Requests>()
  16. {
  17. new Requests() { StatusId = 2 },
  18. new Requests() { StatusId = 3 },
  19. new Requests() { StatusId = 3 },
  20. new Requests() { StatusId = 3 },
  21. new Requests() { StatusId = 1 }
  22. };
  23. Assert.AreEqual(3, statisticsCalculator.CalculateCompleteRequests(requests));
  24. }
  25. }
  26. }