testability Questions
1
As I do most of my programming in Java, I find it compelling to export a class in a Node.js module instead of an object instance, e.g.:
class Connection {
constructor(db) {
this.db = db;
}
con...
Hives asked 26/5, 2017 at 11:5
19
Solved
I've got a few methods that should call System.exit() on certain inputs. Unfortunately, testing these cases causes JUnit to terminate! Putting the method calls in a new Thread doesn't seem to help,...
Math asked 21/11, 2008 at 16:38
6
Solved
While designing my objects I find composition to be a better choice from the perspective of testability. The reason being, I can mock parts of the composition structure if I need to, while running ...
Carrero asked 17/4, 2009 at 13:41
2
Solved
I have been developing a command-line tool which calls System.exit() (don't want to use exceptions instead of) on certain inputs.
I am familiar with Java: How to test methods that call System.exit...
Lundberg asked 22/8, 2016 at 7:48
2
Suppose I am writing an application in Redux and I am tasked to add logging using a 3rd party library. Its API is as follows:
function createLogger(token) {
// the logger has internal state!
let...
Leeway asked 8/12, 2015 at 20:31
2
Solved
I've developed a lot of code in Java and dabbled in Groovy and Haskell which has now led me to Scala.
I feel relatively comfortable with the functional side of Scala, but I'm finding myself a bit ...
Abernathy asked 14/2, 2015 at 16:0
3
Solved
Somebody tasked with creating a "Core" set of libraries created a set of static classes providing all sorts of utilities from logging, auditing and common database access methods.
I personally thi...
Komara asked 20/5, 2009 at 15:30
4
Solved
All,
Wanted to get a few thoughts on this. Lately I am becoming more and more of a subscriber of "purist" DI/IOC principles when designing/developing. Part of this (a big part) involves making sur...
Cotopaxi asked 18/8, 2009 at 22:36
2
Solved
I am used to IoC/DI in web applications - mainly Ninject with MVC3. My controller is created for me, filled in with all dependencies in place, subdependencies etc.
However, things are different in...
Lactoprotein asked 9/7, 2011 at 11:59
4
Solved
Should you design your code to make testing easier? And if so how to design c++ code so that it is easy to test.
How do you apply dependency-injection in c++?
Should I implement the classes usin...
Hyperopia asked 5/11, 2009 at 14:39
1
© 2022 - 2024 — McMap. All rights reserved.