mocking
Can I mock a protected superclass method call in Java?
I have stumbled up开发者_如何学运维on a testing problem of mocking a call of protected method from a super class.[详细]
2023-04-10 12:25 分类:问答NoMethodError: undefined method `mock' with Mocha and Rails 3
I\'m trying to use mocha in my Rails 3 project but keep getting the following exception: NoMethodError: undefined method `mock\' for #<MochaTest:0x00000101f434e8>[详细]
2023-04-10 06:06 分类:问答Unit test a method which is on high abstraction level
A similar topic has been discussed in The value of high level unit tests and mock objects However, I\'d like to describe a specific situation and ask your opinion about how I should write a unit test[详细]
2023-04-10 05:48 分类:问答Mock classes with traits
Is there any library that provides tools for mocking classes with traits (both can be statefull)? Simplified example:[详细]
2023-04-09 18:24 分类:问答Faking/mocking an interface gives "no default constructor" error, how can that be?
I\'m trying to write a unit test of a repository implementation. The repository uses RavenDB as a database. For the unit tests, I would like to mock the RavenDB parts. In order to create the mocks (fa[详细]
2023-04-09 01:58 分类:问答How to test HtmlHelpers that call Partial?
I\'ve been looking at this Stackoverflow question and have the answer implemented.It works all fine and dandy until I get to call HtmlHelper.Partial in my helper method, which is listed below. I know[详细]
2023-04-08 21:56 分类:问答Power Mock - Assertion error when mocking final class
I was trying to mock certain scenarios using Power Mock. I am getting assertion error on below test method - returnSevenTest().[详细]
2023-04-07 18:15 分类:问答Using Mock() in Python
Can you give some clear examples of uses of the Mock() in Django unittests? I want to understand it more clearly.[详细]
2023-04-07 09:11 分类:问答How to mock context while unit testing code using VirtualPathUtility.GetAbsolute method
I am running unit tests on code which uses VirtualParthUtility.GetAbsolute, but am having problems mocking the context for this to work.[详细]
2023-04-06 23:26 分类:问答SpecFlow, Webdriver and Mocks - is it possible?
The question in short is that we are stumbling upon BDD definitions that more or less require different states - which leads to the necessity for a mock of sorts for ASP.NET/MVC - I know of none, whic[详细]
2023-04-06 20:34 分类:问答
加载中,请稍侯......