Unit testing is a method by which individual units of source code are tested to determine if they are fit for use.

learn more… | top users | synonyms (1)

1
vote
2answers
387 views

Is there a better way to organize my module tests that avoids an explosion of new source files?

I've got a neat (so I thought) way of having each of my modules produce a unit-test executable if compiled with the -DTESTMODULE flag. This flag guards a main() function that can access all static ...
0
votes
1answer
41 views

Is there a cleaner way to test extras_require

I have code reviewed a piece of Python code, but to me it looks really ugly, hacky and complex for something that can be achieved very easily. The code looks something similar to the following: ...
0
votes
0answers
93 views

Unit Testing: Pass in Modules or Entire Codebase?

In unit testing, the idea is (I think, correct me if I'm wrong) to unit test a module, then integration test these modules together, then integration test the respective "regions" of modules you ...
0
votes
0answers
49 views

Populate faked context for unit testing WPF ViewModels using entity framework

We're developing an entity framework based application which has about 20 different entities, with quite a lot of connections of various types (one-many, many-many etc) between them. Each entity also ...
0
votes
0answers
47 views

Mixing newable and injectable in a Callable

I recently read http://misko.hevery.com/2008/09/30/to-new-or-not-to-new/ which discussed newable vs injectable objects. What would you do if you needed to make a Callable that talks to some service ...
0
votes
0answers
45 views

Unit Testing an object which belongs to another

My example is in Rails/rspec, but is more generic in nature. I have an (abstract-y) class of Events which are attached to another (abstract-y) class, Assets (. Now, I'm testing using FactoryGirl and ...
0
votes
0answers
88 views

Run RSpec from within a ruby script while refreshing all ruby configs etc

I'm working with a very large project with tons of established tests that include some reasonably complicated environment setups and what not. I've recently run into a situation testing some ...
0
votes
0answers
69 views

What is a good method of storing test data for development and unit testing with angular and jasmine?

What is a good method of storing JSON data/objects for development and unit testing with angular and jasmine? I have seen some ways of accomplishing this. However, since I am new to unit testing with ...
0
votes
0answers
35 views

How to unit-test for PHP implicit conversion errors?

Is there a way to find errors caused by crafted input in php, such as naming POST-fields like variable[] instead of variable, causing PHP to implicitly convert it into an array, by using some form of ...
0
votes
0answers
38 views

Functional tests only to testing the infrastructure layer, or test too the domain services without mocking?

This is a code example: My entities (Domain Layer): class Account: def __init__(name, author): self.name = name self.email = email My repositories interfaces (Domain Layer): ...
0
votes
0answers
91 views

Model Driven Design with Bean Validation

If I have a rich domain library that gets included into a Java web application, but I want to achieve a level of dependency isolation with that domain library such that it is possible to build and ...
0
votes
0answers
78 views

Unit Testing in iOS — Should I split out my Data Model into it's own class?

I'm attempting to try out using unit test in for the first time in new iOS activity for work. I love the idea of unit testing, but always find the specifics to be... messy. I get the general ...
0
votes
0answers
110 views

Unit Tests for Database Abstraction Layer

I previously asked this question about creating an algorithm for joining records from multiple databases, and since then, I have built a rudimentary version of it (which doesn't allow for inter ...