I am using a native library which returns an IntPtr to a memory location, which contains the value of an attribute. I know what the type of the attribute is and I have a method for marshalling a value (taking the IntPtr and the type of the attribute) from the memory pointed at by the pointer. This method either calls Marshal.ReadInt32, or reads a series of bytes and converts them to a double, or reads a string with Marshal.PtrToStringUni etc etc. I would like to write some unit tests for this method but am not sure how I go about creating the IntPtr to pass to the method. I'm using NUnit and cannot use a mocking framework.I am using a native library which returns an In