Hi all!
i am new to TDD & Mocks (but very enthusiastic about it).
i am using MSTest & Rhino mock 3.5.
testing are OK when running each one separately, but when running
entire TestSet, the first one is OK but all other are failing.
My hunch is that i am holding the mocked object between tests, and
causing the problem (i saw that it is same object).
i also tried to use a repository instance insted of the static one,
but it didn't help.
can someone help ?

my tests are all from the same template:

         [TestMethod]
        public void TestBasicLogMethod()
        {
            using (Logger log = MockRepository.GenerateMock<Logger>
(null, null))
            {
                //set the instance into the logProvider private static
logger
                LogProvider.c_logger = log;

                log.Expect(l => l.WriteToLog(LogSeverity.Debug,
"LogTest.AOPTests", "LogMethod", "OnEntry"));
                log.Expect(l => l.WriteToLog(LogSeverity.Debug,
"LogTest.AOPTests", "LogMethod", "OnExit"));

                LogMethod();
                log.VerifyAllExpectations();
            }
        }

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Rhino.Mocks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rhinomocks?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to