Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
0 votes
0 answers
66 views

Our project is using Microsoft.ApplicationBlocks.Data.SqlHelper to read and write data from a database. Is it possible to write unit test for the SqlHelper class using mock? If yes, then how?
sonam sharma's user avatar
0 votes
2 answers
1k views

Is any way to make rhino.mocks work in test project with .NET 6 platform? I am always getting Exception, when the code below is called (under .NET 6 project). Exception: Method not found: 'System....
aBaTaPbl4's user avatar
0 votes
1 answer
52 views

In unit testing, I often use Stub to mock third-party functions. But I don't know how to Stub a code like this. enter image description here I want to control the return value of registry. I tried to ...
Kimmy's user avatar
  • 3
0 votes
2 answers
4k views

I am very new to Testing. I am trying to understand how can I unit test since I do not really need to actually trigger these services but probably mock every step. How can I unit test the following ...
xtc's user avatar
  • 63
1 vote
1 answer
134 views

I am trying to unit test a command execution for a command that displays a dialog, however I keep getting NullReferenceException and I do not know why. Any suggestion would be appreciated. The ...
MakkaCha's user avatar
2 votes
1 answer
206 views

Is it possible to set a "default" return value for a RhinoMock stub? For ex: I have a method that takes in an int from 1-175 and returns a bool: internal bool myFunction(int number) I want ...
erli's user avatar
  • 418
0 votes
0 answers
871 views

I'm converting MSUnit test to XUnit. public class ClassName { protected IDomainQueries MockILogQueries { get; private set; } protected IQueryContext MockQueryContext { get; private set; } ...
Rakesh Nalumachu's user avatar
0 votes
0 answers
78 views

I have this setup in my unit test HttpApplication application = MockRepository.GenerateStub<HttpApplication>(); application.Stub(a => a.CompleteRequest()); And when I run the tests it throws ...
reagan yuan's user avatar
6 votes
2 answers
2k views

I'm using a third party library which has some classes I'm trying to mock using Rhino Mocks. When I attempt to create a stub for a class, I'm getting the following error. I cna't find a reference to ...
Stealth Rabbi's user avatar
0 votes
2 answers
464 views

I am trying to replace this Rhino Mocks implementation: private bool IsHandshakeCalled() { var args = httpExecutorBuilderStub.GetArgumentsForCallsMadeOn(st => st.ExecuteHttpWebRequestAndReturn( ...
kingepard's user avatar
1 vote
1 answer
513 views

I have a piece of code from an old book on MVVM which works, but a test using Rhino Mocks fails with this message: Test method TestProject.UnitTest1.UpdateCustomer_Always_CallsUpdateWithCustomer ...
mins's user avatar
  • 7,776
0 votes
0 answers
45 views

I have a class to test that associates with an interface: interface IMyFactory { int MyProperty {get; set;} int Create(int x); } class ClassToTest { public IMyFactory Factory {get; set;} ...
Harald Coppoolse's user avatar
0 votes
1 answer
248 views

I have two interfaces: interface ITimeframe { DateTime beginTime {get;} DateTime endTime {get;} } interface ITimeframeFactory { ITimeframe Create(Datetime beginTime, DateTime endTime); }...
Harald Coppoolse's user avatar
1 vote
1 answer
243 views

I've got a SqlLayer class I'm trying to Mock that has a GetDataReader method that accepts a string query and an IEnumerable of SqlParameters. I've tried stubbing out the method call like this: var ...
will's user avatar
  • 897
0 votes
0 answers
191 views

I am working on a large desktop application. The application communicates with number of external services and application is using Unity container to resolve the objects. I am facing issue in writing ...
Umer Waheed's user avatar
  • 4,684

15 30 50 per page
1
2 3 4 5
82