| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- using Microsoft.VisualStudio.TestTools.UnitTesting;
- using MyClasses.PersonClasses;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace MyClassesTest
- {
- [TestClass]
- public class PersonTest : TestBase
- {
- #region Initialize and Cleanup class Test
- [ClassInitialize]
- public static void InitializeClass(TestContext tc)
- {
- }
- [ClassCleanup]
- public static void CleanUpClass()
- {
- }
- #endregion
- [TestMethod]
- public void IsNullTest()
- {
- PersonManager mgr = new PersonManager();
- Person per;
- per = mgr.CreatePerson("", "Sheriff", true);
- Assert.IsNull(per);
- }
- [TestMethod]
- public void IsIntanceOfTypeTest()
- {
- PersonManager mgr = new PersonManager();
- Person per;
- per = mgr.CreatePerson("Paul", "Sheriff", true);
- Assert.IsInstanceOfType(per, typeof(Supervisor));
- }
- }
- }
|