GetNextForm() 공개 메소드

public GetNextForm ( int id ) : Form
id int
리턴 Domain.Form
예제 #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);
        }
예제 #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);
        }