123456789101112131415161718192021222324252627282930313233343536373839404142 |
- using Microsoft.VisualStudio.TestTools.UnitTesting;
- using System;
- using TestSession2;
- namespace TestProject
- {
- [TestClass]
- public class UnitTest1
- {
- [TestMethod]
- public void GetCorrectValues()
- {
- Product product = new Product(3-1, 1-1, 15, 45, 20);
- Assert.IsTrue(WSUniversalLib.Calculate(product) == 114147);
- }
- [TestMethod]
- public void GetQuantityForProduct_NonExistentProductType()
- {
- Product product = new Product(3 , 1 - 1, 15, 45, 20);
- Assert.IsTrue(WSUniversalLib.Calculate(product) == -1);
- }
- [TestMethod]
- public void GetQuantityForProduct_NonExistenMaterialType()
- {
- Product product = new Product(3-1, 8, 15, 45, 20);
- Assert.IsTrue(WSUniversalLib.Calculate(product) == -1);
- }
- [TestMethod]
- public void GetQuantityForProduct_NonExistenMaterialTypeAndProductType()
- {
- Product product = new Product(3, 8, 15, 45, 20);
- Assert.IsTrue(WSUniversalLib.Calculate(product) == -1);
- }
-
- }
- }
|