AccountRespoitoryTester tests failed

Jun 15, 2009 at 1:57 PM

The Accounts table has a foreign key to the Terms table. This caused adding an account to fail.

Change code as follows:

 

        [Test]
        [ExpectedExceptionAttribute(typeof(System.Data.SqlClient.SqlException))]
        public void ShouldFailToSaveAnAccountWithoutTerms()

        {

// Copy code from old ShouldSaveAnAccount.

        }

        [Test]
        public void ShouldSaveAnAccount()
        {

             using (FisharooDataContext fdc = conn.GetContext())
             {

// Same as today

                a.Email = "asiemer@hotmail.com";

                 a.TermID = 1;

                 fdc.Accounts.InsertOnSubmit(a);

// Same as today

}

}

Jun 18, 2009 at 7:06 PM

The test package is something that needs to be rounded out.  It has had no attention at all!  Please feel free to provide the fixes to this if you are so inclined!