1234567891011121314151617181920212223242526272829303132333435363738394041 |
- using Microsoft.VisualStudio.TestTools.UnitTesting;
- using System;
- using System.Text.RegularExpressions;
- using WSUniversalLib;
- namespace UnitTestWSUniversalLib
- {
- [TestClass]
- public class UnitTest1
- {
- [TestMethod]
- public void TestGetQuantityForProductIsInstanceOfType()
- {
- Assert.IsInstanceOfType(Calculation.GetQuantityForProduct(3, 1, 15, 20, 45), typeof(int));
- }
- [TestMethod]
- public void TestGetQuantityForProductIsNotInstanceOfTypeString()
- {
- Assert.IsInstanceOfType(Calculation.GetQuantityForProduct(3, 1, 15, 20, 45), typeof(int));
- }
- [TestMethod]
- public void TestGetQuantityForProductAreEqual()
- {
- Assert.AreEqual(Calculation.GetQuantityForProduct(3, 1, 15, 20, 45), 114146);
- }
- [TestMethod]
- public void TestGetQuantityForProductAreNotEqual()
- {
- Assert.AreNotEqual(Calculation.GetQuantityForProduct(3, 1, 15, 20, 45),999999);
- }
- [TestMethod]
- public void TestGetQuantityForProductIsNotNull()
- {
- Assert.IsNotNull(Calculation.GetQuantityForProduct(3, 1, 15, 20, 45));
- }
- }
- }
|