예제 #1
0
        public void FindCompanyById_returns_the_right_company_if_it_exists()
        {
            var repo = new SqlFulcrumRepository(this.contextMock.Object);

            var returnedCompany = repo.FindCompanyById(3);
            Assert.AreEqual(3, returnedCompany.Id);
            Assert.AreEqual("Charlie Corporation", returnedCompany.Name);

            var returnedCompany2 = repo.FindCompanyById(4);
            Assert.AreEqual(4, returnedCompany2.Id);
            Assert.AreEqual("Delta Corporation", returnedCompany2.Name);
        }
예제 #2
0
 public void FindCompanyById_returns_null_if_id_does_not_exist()
 {
     var repo = new SqlFulcrumRepository(this.contextMock.Object);
     var company = repo.FindCompanyById(5);
     Assert.IsNull(company);
 }