public void UpdateMethodOk() { clsStaffMemberCollection AllStaffMembers = new clsStaffMemberCollection(); clsStaffMember TestItem = new clsStaffMember(); Int32 primaryKey = 0; TestItem.UserId = 2; TestItem.PrivilegeLevelId = 1; TestItem.FirstName = "Peter"; TestItem.LastName = "Jackson"; TestItem.Confirmed = true; TestItem.Allowed = true; AllStaffMembers.ThisStaffMember = TestItem; primaryKey = AllStaffMembers.Add(); TestItem.StaffMemberId = primaryKey; TestItem.UserId = 2; TestItem.PrivilegeLevelId = 1; TestItem.FirstName = "Pete"; TestItem.LastName = "Jacson"; TestItem.Confirmed = false; TestItem.Allowed = false; AllStaffMembers.ThisStaffMember = TestItem; AllStaffMembers.Update(); AllStaffMembers.ThisStaffMember.Find(primaryKey); Assert.AreEqual(AllStaffMembers.ThisStaffMember, TestItem); }
public void StaffMemberIdPropertyOk() { clsStaffMember aStaffMember = new clsStaffMember(); Int32 staffMemberId = 1; aStaffMember.StaffMemberId = staffMemberId; Assert.AreEqual(aStaffMember.StaffMemberId, staffMemberId); }
public void FirstNamePropertyOk() { clsStaffMember aStaffMember = new clsStaffMember(); string firstName = "Alan"; aStaffMember.FirstName = firstName; Assert.AreEqual(aStaffMember.FirstName, firstName); }
public void AllowedPropertyOk() { clsStaffMember aStaffMember = new clsStaffMember(); bool allowed = true; aStaffMember.Allowed = allowed; Assert.AreEqual(aStaffMember.Allowed, allowed); }
public void PrivilegeLevelIdPropertyOk() { clsStaffMember aStaffMember = new clsStaffMember(); Int32 privilegeLevelId = 1; aStaffMember.PrivilegeLevelId = privilegeLevelId; Assert.AreEqual(aStaffMember.PrivilegeLevelId, privilegeLevelId); }
public void ConfirmedPropertyOk() { clsStaffMember aStaffMember = new clsStaffMember(); bool confirmed = true; aStaffMember.Confirmed = confirmed; Assert.AreEqual(aStaffMember.Confirmed, confirmed); }
public void UserIdPropertyOk() { clsStaffMember aStaffMember = new clsStaffMember(); Int32 userId = 1; aStaffMember.UserId = userId; Assert.AreEqual(aStaffMember.UserId, userId); }
public void LastNamePropertyOk() { clsStaffMember aStaffMember = new clsStaffMember(); string lastName = "Turing"; aStaffMember.LastName = lastName; Assert.AreEqual(aStaffMember.LastName, lastName); }
public void FindMethodOk() { clsStaffMember AStaffMember = new clsStaffMember(); Boolean found; Int32 staffMemberId = 1; found = AStaffMember.Find(staffMemberId); Assert.IsTrue(found); }
public void LastNameMinPlusOne() { clsStaffMember aStaffMember = new clsStaffMember(); Int32 errorCount = 0; string firstName = "James"; string lastName = "CA"; errorCount = aStaffMember.Valid(firstName, lastName).Count; Assert.AreEqual(errorCount, 0); }
public void FirstNameMinBoundary() { clsStaffMember aStaffMember = new clsStaffMember(); Int32 errorCount = 0; string firstName = "J"; string lastName = "Cameron"; errorCount = aStaffMember.Valid(firstName, lastName).Count; Assert.AreEqual(errorCount, 0); }
public void ValidMethodOk() { clsStaffMember aStaffMember = new clsStaffMember(); Int32 errorCount = 0; string firstName = "James"; string lastName = "Cameron"; errorCount = aStaffMember.Valid(firstName, lastName).Count; Assert.AreEqual(errorCount, 0); }
public void LastNameExtremeMax() { clsStaffMember aStaffMember = new clsStaffMember(); Int32 errorCount = 0; string firstName = "James"; string lastName = ""; lastName = lastName.PadRight(500, 'C'); errorCount = aStaffMember.Valid(firstName, lastName).Count; Assert.AreEqual(errorCount, 1); }
public void FirstNameExtremeMax() { clsStaffMember aStaffMember = new clsStaffMember(); Int32 errorCount = 0; string firstName = ""; firstName = firstName.PadRight(500, 'J'); string lastName = "Cameron"; errorCount = aStaffMember.Valid(firstName, lastName).Count; Assert.AreEqual(errorCount, 1); }
public void ThisStaffMemberPropertyOk() { clsStaffMemberCollection AllStaffMembers = new clsStaffMemberCollection(); clsStaffMember TestItem = new clsStaffMember(); TestItem.UserId = 1; TestItem.PrivilegeLevelId = 1; TestItem.FirstName = "Lana"; TestItem.LastName = "Del Rey"; AllStaffMembers.ThisStaffMember = TestItem; Assert.AreEqual(AllStaffMembers.ThisStaffMember, TestItem); }
public void AddMethodOk() { clsStaffMemberCollection AllStaffMembers = new clsStaffMemberCollection(); clsStaffMember TestItem = new clsStaffMember(); Int32 primaryKey = 0; TestItem.UserId = 2; TestItem.PrivilegeLevelId = 1; TestItem.FirstName = "Martin"; TestItem.LastName = "Scorsese"; AllStaffMembers.ThisStaffMember = TestItem; primaryKey = AllStaffMembers.Add(); AllStaffMembers.ThisStaffMember.Find(primaryKey); Assert.AreEqual(AllStaffMembers.ThisStaffMember, TestItem); }
public void CountMatchesList() { clsStaffMemberCollection StaffMembers = new clsStaffMemberCollection(); List <clsStaffMember> TestList = new List <clsStaffMember>(); clsStaffMember TestItem = new clsStaffMember(); TestItem.StaffMemberId = 1; TestItem.UserId = 1; TestItem.PrivilegeLevelId = 1; TestItem.FirstName = "Tobe"; TestItem.LastName = "Hooper"; TestItem.Confirmed = true; TestItem.Allowed = true; TestList.Add(TestItem); StaffMembers.AllStaffMembers = TestList; Assert.AreEqual(StaffMembers.Count, TestList.Count); }
public void AllStaffMembersOk() { clsStaffMemberCollection StaffMembers = new clsStaffMemberCollection(); List <clsStaffMember> TestList = new List <clsStaffMember>(); clsStaffMember TestItem = new clsStaffMember(); TestItem.StaffMemberId = 1; TestItem.UserId = 1; TestItem.PrivilegeLevelId = 1; TestItem.FirstName = "Pink"; TestItem.LastName = "Floyd"; TestItem.Confirmed = true; TestItem.Allowed = true; TestList.Add(TestItem); StaffMembers.AllStaffMembers = TestList; Assert.AreEqual(StaffMembers.AllStaffMembers, TestList); }
public void DeleteMethodOk() { clsStaffMemberCollection AllStaffMembers = new clsStaffMemberCollection(); clsStaffMember TestItem = new clsStaffMember(); Int32 primaryKey = 0; TestItem.UserId = 3; TestItem.PrivilegeLevelId = 1; TestItem.FirstName = "Martin"; TestItem.LastName = "Scorsese"; TestItem.Confirmed = true; TestItem.Allowed = true; AllStaffMembers.ThisStaffMember = TestItem; primaryKey = AllStaffMembers.Add(); TestItem.StaffMemberId = primaryKey; AllStaffMembers.ThisStaffMember.Find(primaryKey); AllStaffMembers.Delete(); Boolean found = AllStaffMembers.ThisStaffMember.Find(primaryKey); Assert.IsFalse(found); }
public void InstanceOk() { clsStaffMember aStaffMember = new clsStaffMember(); Assert.IsNotNull(aStaffMember); }