Tagged Questions
4
votes
5answers
228 views
How can I test parts of my application against the output of third party application?
I have a fairly new C# application, approximately 6 months old, that we are now trying to incorporate testing into. (Should have been done from the start but I can't change the past)
Parts of this ...
1
vote
0answers
45 views
Testcase runner for parametrized testcases
Let me explain my situation. I'm planning a kind of test case runner for doing testcases on external devices, which are microcontroller based. Lets consider the devices:
Device 1
Device 2
There ...
8
votes
4answers
345 views
In Unit Testing, why would I create a Repository twice?
The other day I was reading a little about Unit Testing and I saw some examples where people create a repository interface (i.e. IExampleRepository) and then create the real repository (public class ...
0
votes
0answers
181 views
How to write unit tests without mocking data
My design doesn't allow me to mock the data so I am using sqlite as test database that has minimum data to run the unit tests. Below is the pseudo code
//Method to be tested
public IList<Funds> ...
1
vote
5answers
283 views
Understanding unit tests/TDD for ASP.NET webforms [closed]
I'm the lead programmer at a small software firm (currently 4 developers including myself), we develop bespoke ASP.NET WebForms applications for businesses. I joined there in 2010 just after ...
12
votes
3answers
339 views
Is there any real value in unit testing a controller in ASP.NET MVC?
I hope this question gives some interesting answers because it's one that's bugged me for a while.
Is there any real value in unit testing a controller in ASP.NET MVC?
What I mean by that is, most ...
12
votes
3answers
452 views
Brittle unit tests due to need for excessive mocking
I've been struggling with an increasingly annoying problem regarding our unit tests that we are implementing in my team. We are attempting to add unit tests into legacy code that wasn't well designed ...
8
votes
1answer
252 views
Unit testing on visualization (3D graphics) frameworks
This is a follow up to this question. There I was asking how to do unit testing when you have a library of scientific algorithms. I have a similar problem now but with a different project.
I'm ...
9
votes
3answers
356 views
Best way to unit test methods that call other methods inside same class
I was recently discussing with some friends which of the following 2 methods is best to stub return results or calls to methods inside same class from methods inside same class.
This is a very ...
5
votes
1answer
145 views
Unit testing for a scientific computing library
I've had a bit of experience with unit testing before, in what I call (not pejoratively) the classic software engineering project: an MVC, with a user GUI, a database, business logic in the middle ...
5
votes
2answers
445 views
Event Driven Programming: A sequence of unfortunate events
I have a very basic game loop whose primary purpose is to check for updates & changes to a list.
I have contemplated using event driven programming to replace the game loop/list idea with an ...
5
votes
2answers
239 views
Helper static methods in TDD
I am creating an application which will be testable(unit + integration). In this application I have a FileHelper static class,
public static class FileHelper
{
public static void ...
25
votes
11answers
2k views
How do we make unit tests run fast?
We have reached the point in our project where we have almost a thousand tests and people have stopped bothering with running them before doing a check in because it takes so long. At best they run ...
7
votes
4answers
496 views
Is it useful to unit test methods where the only logic is guards?
Say I have a method like this:
public void OrderNewWidget(Widget widget)
{
if ((widget.PartNumber > 0) && (widget.PartAvailable))
{
...
8
votes
4answers
558 views
Unit testing and Test Driven Development questions
I'm working on an ASP.NET MVC website which performs relatively complex calculations as one of its functions.
This functionality was developed some time ago (before I started working on the ...