public GetPreviousForm ( int id ) : |
||
id | int | |
Результат |
public void GetPreviousForm_returns_null_when_at_first_position() { Form form1 = new Form {Name = "Form1"}; var repository = new FormRepository(mSession); repository.Insert(form1); var previous = repository.GetPreviousForm(form1.Id); Assert.IsNull(previous); }
public void GetPrevious() { Form form1 = new Form{ Name = "Form1"}; Form form2 = new Form{ Name = "Form2"}; var repository = new FormRepository(mSession); repository.Insert(form1); repository.Insert(form2); var previous = repository.GetPreviousForm(form2.Id); Assert.AreEqual(form1.Name, previous.Name); }