UnitTest1.cs 669 B

1234567891011121314151617181920212223242526
  1. using Microsoft.VisualStudio.TestTools.UnitTesting;
  2. using System;
  3. using WSUniversalLib;
  4. namespace WSUniversalLib
  5. {
  6. [TestClass]
  7. public class UnitTest1
  8. {
  9. [TestMethod]
  10. public void GetQuantityForProduct_NonExistentProductType1()
  11. {
  12. Calculation calculation = new Calculation();
  13. Assert.AreEqual(1, calculation.GetQuantityForProduct(1,1,1,1,1));
  14. }
  15. [TestMethod]
  16. public void GetQuantityForProduct_NonExistentProductType2()
  17. {
  18. Calculation calculation = new Calculation();
  19. Assert.AreEqual(2, calculation.GetQuantityForProduct(1,1,2,1,1));
  20. }
  21. }
  22. }