public void Dismissal_WithValidArgumentsSubPosition_NewChangeReterned() { //Arrange Change OldChange, NewChange; int NumOrd = 1; OldChange = Change.Recruitment(NumOrd, employee1, N1Pos1, true); //ACT NumOrd = 2; NewChange = Change.Dismissal(NumOrd, employee1, OldChange); //Assert Assert.IsTrue(Math.Abs(DateTime.Now.Ticks - NewChange.GetDateChange().Ticks) < 10000000); Assert.AreEqual(OldChange, NewChange.GetPreviousChange()); Assert.AreEqual(NumOrd, NewChange.GetNumberOrder()); Assert.IsNull(NewChange.GetPosition()); Assert.AreEqual(employee1, NewChange.GetEmployee()); Assert.IsTrue(NewChange.GetIsCombination()); Assert.IsFalse(NewChange.GetStatus()); Assert.AreEqual(RecordType.Увольнение, NewChange.GetRecordType()); Assert.IsFalse(OldChange.GetStatus()); }
public void Recruitment_WithValidArgumentsComPos_NewChangeReterned() { //Arrange Change NewChange; int NumOrd = 1; //ACT NewChange = Change.Recruitment(NumOrd, employee1, N1Pos1, true); //Assert Assert.IsTrue(Math.Abs(DateTime.Now.Ticks - NewChange.GetDateChange().Ticks) < 10000000); Assert.IsNull(NewChange.GetPreviousChange()); Assert.AreEqual(NumOrd, NewChange.GetNumberOrder()); Assert.AreEqual(N1Pos1, NewChange.GetPosition()); Assert.AreEqual(employee1, NewChange.GetEmployee()); Assert.IsTrue(NewChange.GetIsCombination()); Assert.IsTrue(NewChange.GetStatus()); Assert.AreEqual(RecordType.Найм, NewChange.GetRecordType()); }