First of all, I'm a Java guy, so I'm not familiar with this Dynamic
Assembly DLL thing.  As such, I apologize in advance.

I've got a fairly good understanding of Rhino Mocks, but now I have a
a config issue I'm not sure how to deal with.

I'm using NUnit 2.5 and Visual Studio 2008. I've tried using
Rhino.Mocks 3.5 and Rhino.Mocks 3.5 for 2.0 as well.

Whenever I want to do anything interesting with the mocking framework,
I seem to be getting these weird error messages in a totally different
test.

Error Message:

1) Test Error :
Unit_Testing.Components.Utilities.TestXmlResourceAccessor.TestGetResourceAsString
   System.NotSupportedException : The invoked member is not supported
in a dynamic assembly.
   at System.Reflection.Emit.AssemblyBuilder.GetManifestResourceNames
()
   at xxx.XmlResourceAccessor.GetResourceAsString(String resourceName)
in xxx\XmlResourceAccessor.cs:line xx
   at
Unit_Testing.Components.Utilities.TestXmlResourceAccessor.TestGetResourceAsString
()



All are somewhat abbreviated (and obfuscated to protect the innocent)
below for things I believe to be irrelevant, but let me know if there
is something else you want to see.

...The test that causes the failure
    [TestFixture]
    public class TestChangePasswordCon
    {

        [Test]
        public void TestNewPasswordsMatch()
        {
            MockRepository mocks = new MockRepository();

            // Using this code causes error in the other test
            ChangePasswordCon classUnderTest2 =
            (ChangePasswordCon)mocks.CreateMock(typeof
(ChangePasswordCon));

            ChangePasswordCon classUnderTest = new ChangePasswordCon
();
            Assert.IsFalse(classUnderTest.NewPasswordsMatch("new",
"new"));

        }
...
    }


...The test that shows as the failure(TestXmlResourceAccessor) calls
this code: (blows up at the ***)

       public static String GetResourceAsString(String resourceName)
        {
            Assembly assembly = Assembly.GetCallingAssembly()
            foreach (String str in
***assembly.GetManifestResourceNames())***
            {
.......

--~--~---------~--~----~------------~-------~--~----~
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