Hello,
actually i m not familiar with testing so i wanna know that how we implement unit testing i mean by specific code or some other method please help me if unit testing is done by code then if u have any example or idea then provide me.
...
Hi,
I am using PHPUnit to test my PHP source code, but I need a way to test client-side code, too. I use ExtJS to build rather complex interfaces that call the server for data. I am wondering here is how does one test the UI?
...
how to call IFormsAuthentication interface in unit testing in asp.net mvc with repositories
...
Hi All,
How can i get test case name during runtime in Visual Studio Test Framework?
I am using VS 2010 to write my unit test cases and I need to get test case name during Test Init for each test and save those in file.
Sample Code
[TestInitialize()]
public void MyTestInitialize()
{
string testCaseName = /...
How would you test the following code with phpUnit?
class Product {
protected $id = null;
public function __construct($id) {
$this->id = $id;
}
public function getDescription($language_id) {
$db_query = mysql_query("SELECT * FROM products_description WHERE products_id = " . (int) $this->id . " AND lang...
I'm learning VS Unit test and tried this:
[TestMethod()]
public void calcTest()
{
double expected = 1.234F; // TODO: Initialize to an appropriate value
double actual;
actual = 1.234F;
Assert.AreEqual(expected, actual);
Assert.Inconclusive("Verify the correctness of this test method.");...
Hi guys!
Are there any ways to test for expected exceptions on an EJB3 session bean method. When I invoke the method the container (glassfish) correctly outputs that an IllegalArgumentException has been thrown, but on the client I am not able to catch any exception arising from that method invocation. Could it be that exceptions at this...
It seems to me that some code is easier to unit test than others. I love writing unit tests for highly functional code (by this, I'm referring to functions that primarily operate on their arguments and return computed results).
But, when the code is much more about it's side effects, testing it becomes much harder. For example, a socket...
I am experimenting with gamestudio A8 and the unit used in the 3d world is quant.
My question is. how many quants is a meter?
I want to make some models in sketchup and I use meters there. I can convert the models to mdl.
The problem is. When animating and moving objects. I need to know how many quants there are in one meter.
I also ...
Is there any tangible value in unit testing your own htmlhelpers? Many of these things just spit out a bunch of html markup - there's little if no logic. So, do you just compare one big html string to another? I mean, some of these thing require you to look at the generated markup in a browser to verify it's the output you want.
Seems a...
This problem doesnt occur in all projects, hence it makes it even more frustrating.
If I click on a Private method to create a unit test, it would generate a TestProject assembly and create a predefined class in there. It woudl also create a Accessor for that class.
[TestMethod()]
[DeploymentItem("xxx.Client.dll")]
pub...
I have an iPhone iOS4.1 application that uses localized strings. I have just started building unit tests using the SenTestingKit. I have been able to successfully test many different types of values.
I am unable to correctly test any of my code that uses NSLocalizedString calls, because when the code runs in my LogicTests target, all of...
I have been performing unit tests on my iOS4.1 iPhone app successfully. I am currently trying to add some tests for a portion of my logic that uses APIs from the MapKit framework.
As soon as I add the MapKit framework to my LogicTest target, the target will not compile -- the compile process just hangs. This occurs even if I have no tes...
I am trying to understand how to use Moq, however I am having some confusion about what Moq should be used for. My understanding is that mock framework are used for generating objects which would be difficult to create under normal circumstances. The examples I have seen of Moq however seem to not only create Moq object, but also provide...
Hi all,
I'm kind of new to unit testing, but I've recently seen how it can be quite useful. I've seen that most unit tests are self running. In fact most unit testing frameworks provide a way of running several tests at once (such as unit testing a whole system).
I wonder though; How do you deal with external resources in self running u...
I'm using RhinoMocks to test an Add() method on a viewModel. I've got one test called AddTest()) which tests everything inside the Add() method, including
1) an item was added the viewModel items list,
2) the item was validated
3) the itemsList pagedCollection view was moved to the correct page
the problem is that this requires about 5...
Hello there, I have just started playing with unit testing / mocks using Moq, and ran into a problem..
I have a Service layer named "CustomerService" which have following code:
public interface ICustomerService
{
Customer GetCustomerById(int id);
}
public class CustomerService : ICustomerService
{
private IRepository<Customer>...
Hello,
I want to test air applications and air libraries using flexmojos 3.9-SNAPSHOT.
However, although flexmojos does indeed has support for air, it tries to run the swf generated by the build using flash player, and as I need to use air native libraries I wanted to run the tests using adl (AIR debug launcher).
To do this, I cloned ...
I've got a clear and simple question.
The webapplication i'm working on is using unit tests (close to 1500 tests). Due to an required modification in the application several tests are failing because The HttpRuntime.BinDirectory doesn't have a value and therefor throws and ArgumentNullException.
Is there a way to set my own value in Htt...
Hey,
I want to define a new distance unit in JScience. The "Tutorial" section of the project website just leads to Javadoc which, while fairly complete, is a bit too dense for me to fathom how I actually go about defining my own unit.
Could you provide an example?
Cheers.
Pete
...