Click here to Skip to main content
15,913,941 members
Home / Discussions / C#
   

C#

 
GeneralRe: add a delay before updating a file. Pin
S. Senthil Kumar17-Oct-05 15:14
S. Senthil Kumar17-Oct-05 15:14 
QuestionUpdate Form while Retaining Access to It Pin
thepolishguy17-Oct-05 3:40
thepolishguy17-Oct-05 3:40 
QuestionCreate an object dynamically for COM component witout reflection Pin
Member 227350917-Oct-05 3:14
Member 227350917-Oct-05 3:14 
AnswerRe: Create an object dynamically for COM component witout reflection Pin
S. Senthil Kumar17-Oct-05 5:27
S. Senthil Kumar17-Oct-05 5:27 
Questionconvert int to hexadecimal Pin
Sasuko17-Oct-05 3:10
Sasuko17-Oct-05 3:10 
AnswerRe: convert int to hexadecimal Pin
Rob Philpott17-Oct-05 5:10
Rob Philpott17-Oct-05 5:10 
AnswerRe: convert int to hexadecimal Pin
S. Senthil Kumar17-Oct-05 5:31
S. Senthil Kumar17-Oct-05 5:31 
QuestionMocking interface methods with 2 dimensional array return types Pin
Anonymous17-Oct-05 3:06
Anonymous17-Oct-05 3:06 
I have found a problem using Rhino (incidentally the same problem is occurring with NMock 1.1).

When I try to mock an interface which defines a method with a multi-dimensional array return type: creating the mock instance throws an error:

ClassLibrary1.SampleTest.MethodOnSampleTest_Rhino : System.TypeLoadException : Method MethodOnSample in type ProxyInterfaceSystemObject_ISample_IMockedObject_ISerializable from assembly DynamicAssemblyProxyGen, Version=0.0.0.0 does not have an implementation.

e.g.
namespace ClassLibrary1
{
public interface ISample
{
double[,] MethodOnSample(string StringArg);
}
}

using NMock;
using NUnit.Framework;
using Rhino.Mocks;

namespace ClassLibrary1
{
///
/// Summary description for SampleTest.
///

[TestFixture]
public class SampleTest
{
[Test]
public void MethodOnSampleTest_Rhino()
{
using (MockRepository mocks = new MockRepository())
{
ISample sample = (ISample) mocks.CreateMock(typeof(ISample));

Expect.Call(sample.MethodOnSample("Test"));

mocks.ReplayAll();

double[,] actual = sample.MethodOnSample("Test");

Assert.IsTrue(true);
}
}

[Test]
public void MethodOnSampleTest_NMock()
{
DynamicMock mock = new DynamicMock(typeof(ISample));

ISample mockInstance = (ISample) mock.MockInstance;

Assert.IsTrue(true);
}
}
}

Has anyone else experienced this problem and is there another mock object I can use to mock this interface?

Thanks.

[U-H]c0d3-m0nk3y
Confused | :confused:
QuestionReminders Pin
PaulaM17-Oct-05 2:36
PaulaM17-Oct-05 2:36 
AnswerRe: Reminders Pin
Andy Brummer17-Oct-05 5:46
sitebuilderAndy Brummer17-Oct-05 5:46 
Questionhow to use the System.IO.IsolatedStorage Pin
Sasuko17-Oct-05 2:32
Sasuko17-Oct-05 2:32 
AnswerRe: how to use the System.IO.IsolatedStorage Pin
Dave Kreskowiak17-Oct-05 5:32
mveDave Kreskowiak17-Oct-05 5:32 
QuestionAdd Command bar in Outlook Pin
Talktorajeev17-Oct-05 1:07
Talktorajeev17-Oct-05 1:07 
QuestionProblem with webservice in production env Pin
Dario Solera17-Oct-05 0:53
Dario Solera17-Oct-05 0:53 
AnswerRe: Problem with webservice in production env Pin
leppie17-Oct-05 0:59
leppie17-Oct-05 0:59 
GeneralRe: Problem with webservice in production env Pin
Dario Solera17-Oct-05 1:03
Dario Solera17-Oct-05 1:03 
GeneralRe: Problem with webservice in production env Pin
Guffa17-Oct-05 1:16
Guffa17-Oct-05 1:16 
QuestionHow to get 4 bytes int from a byte[] array? Pin
rushing17-Oct-05 0:26
rushing17-Oct-05 0:26 
AnswerRe: How to get 4 bytes int from a byte[] array? Pin
Rob Philpott17-Oct-05 0:57
Rob Philpott17-Oct-05 0:57 
AnswerRe: How to get 4 bytes int from a byte[] array? Pin
User 665817-Oct-05 3:42
User 665817-Oct-05 3:42 
GeneralRe: How to get 4 bytes int from a byte[] array? Pin
rushing17-Oct-05 16:49
rushing17-Oct-05 16:49 
QuestionOffice Project Problem Pin
Micu Radu16-Oct-05 23:24
Micu Radu16-Oct-05 23:24 
Questiondll calling problem Pin
Mohammad Daba'an16-Oct-05 22:32
Mohammad Daba'an16-Oct-05 22:32 
AnswerRe: dll calling problem Pin
S. Senthil Kumar16-Oct-05 23:01
S. Senthil Kumar16-Oct-05 23:01 
GeneralRe: dll calling problem Pin
Mohammad Daba'an16-Oct-05 23:08
Mohammad Daba'an16-Oct-05 23:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.