Tagged Questions
4
votes
4answers
2k views
Function for determining triangle type?
A while back I was asked to write some sample code for a job that I was applying for. They wanted a class that had a function that would accept three lengths and return the appropriate type of ...
3
votes
1answer
2k views
Convert number to words (web application)
I'm looking for a new job, and a company who had a role I was going for asked me to do a programming exercise. It consisted of making a web application of two or more pages that took a person's name ...
9
votes
4answers
967 views
Can these unit tests be improved?
I'm not the greatest at writing tests yet and I'm starting a new OSS project for learning and as part of it I want to tackle being more effective at writing tests, more specifically quality tests. I ...
2
votes
1answer
365 views
Refactoring legacy code for unit testing
I'm trying to refactor some code for unit testing and was hoping you could critique it.
This is the original method:
public class MyNonRefactoredClass
{
public List<MyClass> DoSomething()
...
2
votes
2answers
279 views
Trace-like extensions for unit testing
Below is a set of extensions that I use in unit tests.
The basic idea is that when creating or modifying some sort of user output type of string, I want to eyeball the output to see that it makes ...
5
votes
2answers
2k views
Unit (Integration) Test for code that interacts with a database
Hy Guys,
I am trying to create some (I believe these are Integration not Unit) tests for code that interacts with a database and I am not sure this is the right approach.
I would appreciate any ...