GetNextForm() public method

public GetNextForm ( int id ) : Form
id int
return Domain.Form
Esempio n. 1
0
        public void GetNextForm_returns_null_when_at_last_index()
        {
            Form form1 = new Form { Name = "Form1" };

            var repository = new FormRepository(mSession);

            repository.Insert(form1);

            var next = repository.GetNextForm(form1.Id);

            Assert.IsNull(next);
        }
Esempio n. 2
0
        public void GetNext()
        {
            Form form1 = new Form { Name = "Form1" };
            Form form2 = new Form { Name = "Form2" };

            var repository = new FormRepository(mSession);

            repository.Insert(form1);
            repository.Insert(form2);

            var next = repository.GetNextForm(form1.Id);

            Assert.AreEqual(form2.Name, next.Name);
        }