tdd Questions
3
Solved
Other IDE's like PyCharm, IntelliJ, etc. have a feature where if it finds a function being called that is undefined, you can right-click it and click 'create method' or something similar to automat...
Wei asked 7/7, 2022 at 15:34
6
Solved
I'm surprised that Google C++ Testing Framework does not explicitly support checking for memory leaks. There is, however, a workaround for Microsoft Visual C++, but what about Linux?
If memory man...
Brachiopod asked 20/3, 2015 at 20:3
3
Solved
Before stepping into the TDD cycle, I like to sketch out the tests that need to be implemented - i.e. write empty test methods with speaking names.
Unfortunately I have not found a way to "paint t...
2
Solved
currently I'm running more than 1k examples and it's taking a long time to complete (more than 20 minutes!!!).
I'd like to identify which examples are the ones taking more time to complete, is the...
Shorn asked 31/1, 2011 at 21:46
12
Solved
I'm looking for a way to test if some given List is an unmodifiable one.
I have an object that has a List<NoMatter>, in order to offer methods such as addNoMatter(NoMatter nm) instead of all...
Tantra asked 3/12, 2011 at 1:47
9
Solved
How to test specific validation errors in php unit thrown in validation error ?
with below code we could check session has errors, but not the exact error
$this->assertSessionHasErrors();
Sheffie asked 27/3, 2017 at 8:46
4
Solved
I'm using phpunit with Laravel 4 framework. Why is it that when there's a PHP error during the tests, no error messages are shown (eg: missing method)?
How can we get phpunit to show all errors?
...
5
Solved
Can you recoment a book on on Unit Testing and TDD for C# with at least some treatment of Mock Objects?
I have seen this question but it does not seem to mention mocking.
8
Solved
Either I don't understand dependencies vs. devDependencies in node 100% yet or eslint is just wrong here (not capable of analyzing this correctly):
3:1 error 'chai' should be listed in the projec...
Redfield asked 6/7, 2017 at 3:28
4
Solved
1
Solved
My limited brain sometimes has trouble interpreting diffs of arrays of trees of nodes.
I find out outputs from jest like the following to be hard to understand:
Error: expect(received).toEqual(expe...
3
Solved
I'm trying to develop a new feature for an embedded application and I'd like to do so using a test-driven approach.
The project is written in pure C and is being developed using IAR Embedded Workb...
Shanelleshaner asked 14/12, 2016 at 10:25
3
I'm testing a React/Reflux application using Jest. I have the following function in a store:
onLoad: function() {
console.log("ORIGINAL LOAD");
// http request here
}
I'm trying to mock it out...
3
Solved
I have a fresh installation of laravel 5.4
I've tried to modify the default test just to see a failing test.
tests/ExampleTest.php
class ExampleTest extends TestCase
{
/**
* A basic test examp...
Proffer asked 30/1, 2017 at 21:22
17
Solved
We have a system that has some Bash scripts running besides Java code. Since we are trying to test everything that could possibly break, and those Bash scripts may break, we want to test them.
The ...
Dragging asked 27/8, 2009 at 7:33
4
Solved
I am trying to mock console.warn/error but I can't. I use a third-party-library which calls console.warn inside it. I need to test was it called or wasn't. In my test case I was trying to stub cons...
Toft asked 19/12, 2016 at 13:45
21
Solved
I have a coworker who writes unit tests for objects which fill their fields with random data. His reason is that it gives a wider range of testing, since it will test a lot of different values, whe...
Afra asked 28/8, 2008 at 14:45
5
Solved
It is incorrect by design to have async call within TestInitialize, as TestInitialize has to happen before any TestMethod and have fixed signature.
Can this be correct approach in any way to have a...
Evertor asked 4/12, 2013 at 12:15
11
I am writing a test using GoogleTest for the following class and I am getting the above error.
class Base
{
// Other Functions;
CSig objSig[50];
}
The Class CSig is as follows:
class CSig
{
...
Peanuts asked 31/10, 2012 at 12:11
5
Solved
A very specific question from a novice to TDD:
I separate my tests and my application into different packages. Thus, most of my application methods have to be public for tests to access them. As I ...
Floridafloridia asked 17/3, 2010 at 19:3
9
Solved
Either using Nunit or Microsoft.VisualStudio.TestTools.UnitTesting. Right now my assertion fails.
[TestMethod]
public void GivenEmptyBoardExpectEmptyBoard()
{
var test = new Board();
var inp...
Azotobacter asked 8/5, 2014 at 1:0
3
Solved
How do I modify AutoFixture create method for float, double and decimal, so that when these types get created they will also have a remainder?
Currently I do this, but this throws exception.
var ...
Winebibber asked 16/7, 2013 at 9:31
3
Solved
I am trying to test whether a function prints out something. How can I do this with XCTests? If this is possible, are there factual reasons to do it and not do it?
Thanks!
Showboat asked 1/12, 2018 at 7:43
7
Solved
When using Mockito 1.9.x I have been using Whiteboxto set values of fields to "inject" mocks. Se example below:
@Before
public void setUp() {
eventHandler = new ProcessEventHandler();
securityS...
7
Solved
How to verify that a method is not called on an object's dependency?
For example:
public interface Dependency {
void someMethod();
}
public class Foo {
public bar(final Dependency d) {
...
}...
Gheber asked 12/10, 2012 at 15:44
1 Next >
© 2022 - 2024 — McMap. All rights reserved.