I want to write tests to check the existance (and other stuff) of certain files that will be shipped with our project.
This is what I have right now:
[DeploymentItem("1.pdf")]
[DeploymentItem("2.pdf")]
public class DoFilesExist
{
List<string> _Files;
public DoFilesExist()
{
_Files = new List<string>();
...
I'm currently developing a TDD idmb html scraper which ill extract certain fields from the imdb webpage. Eg. Title, Synopsis,Cast etc in C++.
I'm just wondering if i have done the TDD right , i have 2 classes the Parser Class & MatchPattern class.
The parser class has like a loadfile function that loads the file into a string and then...
I want to store some test data for a FlexUnit test in small XML files in my Flex project, and access them trivially for the flex test. How can I load these bits of data synchronously? HTTPService is the way I'd be loading them _a_synchronously, but adding event handlers to my test cases seems like a bit of overkill.
...
I need to know how to tell MSTEST to run all test projects in a solution file. This needs to be done from the command line. Right now I have to pass it a specific project file, I'm trying to get it to run from a SOLUTION file.
I'm hoping this is possible, because in Visual Studio, hitting Ctrl+R, A, runs ALL tests in the currently ope...
Hi all,
After several years of following the bad practice handed down from 'architects' at my place of work and thinking that there must be a better way, I've recently been reading up around TDD and DDD and I think the principles and practices would be a great fit for the complexity of the software we write.
However, many of the TDD sa...
I really want to get into TDD development but I have no point of reference where to start.
I think that looking at code and seeing how they write tests and make classes testable that it'll be easier for me to digest and start using myself.
Is anyone aware of any sample or small open source C# applications that include unit tests?
...
Hi!
I'm practice TDD and run my tests very often.
Eclipse has nice command to run last launched configuration.
But when I in some unit test, Eclipse run only test for current unit test.
I want run all my unit tests instead.
Yes, i can use mouse to run command that run all junit test, but, repeat. I'm run tests very often.
...
For the past few years I've continuously struggled with unit testing database code and all the pain that comes with it. I found this existing thread which I found very enlightening:
What's the best strategy for unit testing databases?
The author of the accepted answer suggests that it might be useful to mock the entire database layer...
I'd like to start using a Test Driven Development system for a private project since I saw my employer using it and realized it was very useful. My employer's project was in C# but mines are in C and C++.
I looked around and saw that several packages exist for both Java and .NET (for example: NCover, NUnit, ...). Unfortunately I found i...
After reading the first 7 chapters of Pro ASP.NET MVC Framework -a very recommended read, i'd say. Throughout my reading, the author -Steve Sanderson, touched on some TDD practices a lot. Now my question is:
Steve used to perform his unit tests against the controllers themselves, an example of the book:
[Test]
public void List_Inc...
So regards logging from SO and other sites on the Internet the best response seems to be:
void DoSomething() {
Logger.Log("Doing something!");
// Code...
}
Now generally you'd avoid static methods but in the case of logging (a special case) this is the easiest and cleaniest route. Within the static class you can easily inject ...
For unit tests should you;
Write a test. Write code to pass it.
Refactor.
Or
Write all your known tests. Make one
pass. Refactor.
I ask this because TDD states you stop writing code after all tests pass but this point is unclear.
Edit
One thing I think TDD focuses on more for this "rule" is in relation to stories/task...
I'm busy! Most of my time is spent using analytical techniques, or on course work, and when I switch over to programming mode I need to generate code quickly. Since, the Primary Investigator for the lab I'm in doesn't care if I'm using TDD or an abacus as long as I get results fast.
I've read "TDD by example" and found it quite helpful....
What methods do you use to unit test event handlers, particularly if they require information from the event (such as mouse coordinates, or the target of the event)? Is the most common practice to just refactor the behavior into a method that does the lifting while the handler just extracts information from the event, or are there effect...
What are the good resource to learn BDD & TDD (ruby , C#, javascript).
What are the good framework using now?
...
I've found that test first development can be painful if the workflow is slow. It can take a long time to write a test, compile, run the tests, write code, compile, then run the tests again. Part of the problem is that the delays to compile and run tests to some extent interrupts my flow. When my brain has an idea, I want to be able t...
I'm writing a bunch of tests for a class, and frankly I don't want to go to the effort of naming each test intelligently: "Compare2002to2002forLessThanOrEqual"
I'm cool with TestMethod1 through TestMethod120 - but I've got to edit each name, and that gets annoying. Is there any plugin that will generate unique names for all the methods...
We are in the initial phase of trying to implement TDD. I demo'd the Visual Studio Team System code coverage / TDD tools and the team is excited at the possibilities. Currently we use Devpartner for code coverage, but we want to eliminate it because its expensive. We have very limited experience in TDD and want to make sure we don't go a...
I am refactoring a class so that the code is testable (using NUnit and RhinoMocks as testing and isolations frameworks) and have found that I have found myself with a method is dependent on another (i.e. it depends on something which is created by that other method). Something like the following:
public class Impersonator
{
private ...
In my NUnit testfixtrues i have something along the lines of
[Test,Category("catA")]
public void test1
{
//
}
[Test,Category("catB")]
public void test2
{
//
}
[Test,Category("catA")]
[Test,Category("catB")]
public void test3
{
//
}
Now in the NUnit gui i want to be able to select catA and catB and run the tests where cat...