Hi
I was testing my app on the simulator when it crashed on clicking a button of a UIAlertView. I stopped debugging there, made some changes to the code and built the app again. Now when I run the application, I get this error in the console
Couldn't register com.myApp.debug with the bootstrap server. Error: unknown error code.
This ge...
I am trying to mock java.awt.Toolkit.beep() using JMockit Expectations. I have the following code in my test case:
new Expectations() {
Toolkit mock;
{
mock.beep();
}
}.endRecording();
When I run the test case (JUnit 4), I get the following exception at the "new Expectations" line:
java.lang.ClassFormatError: Cod...
In the .net 3.5 project that I am working on right now, I was writing some tests for a service class.
public class ServiceClass : IServiceClass
{
private readonly IRepository _repository;
public ServiceClass(IRepository repository)
{
_repository = repository;
}
#region IServiceClass Members
pu...
I am writing a class that I know that needs a lock, because the class must be thread safe. But as I am Test-Driven-Developing I know that I can't write a line of code before creating a test for it. And I find very difficult to do since the tests will get very complex in the end. What do you usually do in those cases? There is any tool to...
I'm developing an alternate backend for the canvas interface. I started setting up test cases, and then it occurred to me that there may already by a set of tests, but google isn't forthcoming.
...
Hi,
I'm using Bazaar for version control, which I'm very happy with. In Bazaar every tree/project in source control is called a 'branch'.
Currently I have a 'main' branch for the actual application, and a 'dev' branch which houses some things like unit tests, as well as the user manual, etc. This way, both the app and its associated ...
How to test my IBinder object that Service return on onBind ?
...
Well I have been thinking about this for a while, ever since I was introduced to TDD.
Which would be the best way to build a "Hello World" application ? which would print "Hello World" on the console - using Test Driven Development.
What would my Tests look like ? and Around what classes ?
Request: No "wikipedia-like" links to what T...
I'm trying to model my tests after the great work that the Thougtbot guys have done. They seem to use the test framework built into Rails Shoulda. Great.
I have been hearing a lot about Autotest - that its magical-ness should make things easier.... I expected that things would 'just work' if I installed it. My rake test:units already a...
Hello,
I don't understand how an unit test could possibly benefit.
Isn't it sufficient for a tester to test the entire output as a whole rather than doing unit tests?
Thanks.
...
Hello,
What is functional testing? How is this different from unit testing and integral testing?
Thanks
...
NUnit and MbUnit has a RowTest attribute that allows you to sent different set of parameters into a single test.
[RowTest]
[Row(5, 10, 15)]
[Row(3.5, 2.7, 6.2)]
[Row(-5, 6, 1)]
public void AddTest(double firstNumber, double secondNumber, double result)
{
Assert.AreEqual(result, firstNumber + secondNumber);
}
I used to be huge fan of...
I'm developing a Spring webflow, trying to use TDD so I've extended AbstractXmlFlowExecutionTests. I can't see an obvious way to assert what I would have thought would be a simple thing: that a view state has an associated view of a given name. For example, given this flow (excerpt):
<?xml version="1.0" encoding="UTF-8"?>
<flow ...>
...
I really like the moq mocking framework. I've used it on several projects. Unfortunately, one of my customers is demanding we use VB.Net. Not my preference, but hey, .Net is .Net, right?
I've heard that moq has some trouble with VB. Is this true? Is so, what sorts of trouble? I would expect it to work fine given the language agnos...
I have a model which gets its data from a parser object. I'm thinking that the parser class should live in the lib/ directory (although I could be persuaded that it should live soewhere else). The question is: Where should my unit tests for the parser class be? And how do I ensure that they are run each time I run rake test?
...
I'm fooling around with the XNA framework.
To help me around I made a helper class that looks like this:
ActorHolder
+ SpriteBatch (SpriteBatch)
+ ContentManager (ContentManager)
- drawables (IList<IDrawable>)
- updatables (IList<IUpdatable>)
+ ActorHolder(GraphicsDevice, ContentManager)
+ Draw(GameTime)
+ Update(GameTime)
+ AddActor(I...
I've been thinking about writing unit tests for my PHP/MySQL projects.
The thing that bugs me is how i can test things like form validation, ajax features, and UI features (such as clicking links). Also, I don't want the tests to be dependent on one aspect of the UI, so if I moved one link then all tests would break.
Does anyone have a...
In NUnit 2.5 you can do this:
[TestCase(1,5,7)]
public void TestRowTest(int i, int j, int k)
{
Assert.AreEqual(13, i+j+k);
}
You can do Parametric test.
But I wonder whether you can do this or not, Parametric test with generic test method?, i.e.,
[TestCase <int>("Message")]
public void TestRowTestGeneric<T>(string msg)
{
Assert....
I've just started out using ASP.NET MVC and TDD. I've read that while unit testing you should focus on testing your code, not other systems, like the DB. However, what happens when essential functionality is residing in the DB?
I've used the MVC Storefront series as an initial guide in how to set up my projects and patterns. As full tex...
I use a code generator (CodeSmith with .NetTiers template) to generate all the DAL code. I write unit tests for my code (business layer), and these tests are becoming pretty slow to run. The problem is that for each test, I reset the database to have a clean state. Also, as I do a lot of tests, it seems that the latency of the database o...