mocking
Mimic another Ruby class so the object passes the === type check
I want to create an object that acts as a specific class, such as Fixnum, but isn\'t an instance of that class nor its subclasses.[详细]
2023-03-26 17:12 分类:问答Start a second activity inside a TestCase (which is not the activity under test)
How can I start a second (mock) activity in a ActivityInstrumentationTestCase2 or InstrumentationTestCase?[详细]
2023-03-26 17:09 分类:问答What to name a mock injector/expectation setup interface for end to end tests?
I am writing an interface into our system that will allow end to end tests 开发者_如何学Pythonto change the behaviour of the server in order to run through various automated test scenarios.[详细]
2023-03-26 15:24 分类:问答Mocking dataSource during Unit Testing
I would like to unit test my DB independent web layer controllers even if the database is down. But t开发者_开发技巧he transactionManager bean instantiation fails because the connection cannot be ach[详细]
2023-03-26 13:13 分类:问答Mocking System.Data.SqlClient.X classes
We have several places in our code-base where we do something similar to the following: DataTable dt = new DataTable();[详细]
2023-03-26 11:52 分类:问答Mocking Spring beans
I\'d like to continue this question. These answers foo and bar are exactly what I would need. But for the bar example spring doesn\'t infer the type of bean that is returned from generic mock() meth[详细]
2023-03-26 07:11 分类:问答Controller tests bleeding to models?
I am writing some tests with RSpec (tests and not specs, the code was untested until now) and have stumbled upon an uncertainty...[详细]
2023-03-26 06:35 分类:问答How to call delegate only once / one time with moles?
How is it possible to call a delegated Method only once / one time with moles? MyClass.AllInstances.ResultateGet = delegate { return new ResultatInfoColle开发者_如何学Pythonction(); };[详细]
2023-03-26 00:37 分类:问答Grails mockDomain save not saving
I\'m writing a unit test for some simple methods.The issue I am having is that \'save\' is not working for my domain object even though the domain should be mocked.When calling validate on the domain[详细]
2023-03-25 23:20 分类:问答Mocking local api in cucumber tests
I am writing an app that access a local that lives on a separate path on my own server via ajax requests. However, I want to test the app with cucumber and mock out the backend. Is there something lik[详细]
2023-03-24 05:51 分类:问答