Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

Recent questions tagged mocking

0 votes
783 views
1 answer
    With Karate, I'm trying to work out how to return different mock responses based on the content of the request ... me in the right direction? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
755 views
1 answer
    I created a new Android test project. I downloaded powermock-mockito-junit-1-1.5.zip from https:// ... org.hamcrest.Description problem? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
507 views
1 answer
    I would like to be able to log every write/read that my go app issues to the underlying OS, and also (if it ... there is a ready-to-Go solution? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.0k views
1 answer
    I try to use mock to write some unit-tests in python. For example I have the following class: class TCPHandler( ... mock seems not to be called. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
556 views
1 answer
    Is it possible to Mock a single method of a Java class? For example: class A { long method1(); String method2( ... a.method3() untouched. } } See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
394 views
1 answer
    I've read (and re-read) Martin Fowler's Mocks Aren't Stubs. In it, he defines two different approaches to ... the essay back in January 2007. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
554 views
1 answer
    I try to test some codes which don't return anything but save the result to the DB. By mocking the save ... be called directly from the class). See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
454 views
1 answer
    I have developed an android app that is using retrofit with rxJava, and now I'm trying to set up ... that NullPointerException? Thanks a lot! See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
680 views
1 answer
    I have a method that accepts default arguments: def build_url(endpoint, host=settings.DEFAULT_HOST): return '{}{} ... a mocked settings object? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
436 views
1 answer
    I would like to test my class' equals() method but Mockito seems to be calling the stub version every time. My ... but I get the same result. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
583 views
1 answer
    Is there a clean way to patch an object so that you get the assert_call* helpers in your test case, ... staticmethods, unbound methods, etc. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
381 views
1 answer
    Is it possible to mock a module in python using unittest.mock? I have a module named config, while ... from test_config module instead. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
571 views
1 answer
    Given a Kotlin singleton object and a fun that call it's method object SomeObject { fun someFun() {} } ... mock call to SomeObject.someFun()? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
991 views
1 answer
    I have class class CSumWnd : public CBaseWnd { private: bool MethodA() } Please can you help how to ... concept of hi-perf dependency injection See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
859 views
1 answer
    I have a few static util methods in my project, some of them just pass or throw an exception. There are ... success but I dislike workarounds. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
676 views
1 answer
    I'm using slf4j and I want to unit test my code to make sure that warn/error log messages are generated ... framework I'm using is Mockito. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
653 views
1 answer
    I have some unit tests for a function that makes use of the window.location.href -- not ideal I would ... for my unit testing framework. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
Ask a question:
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...