In view pages, people use form tag helpers and link helpers etc.
If I then rename a controller, or a action, my view pages may break.
How can I unit test view related tags for this kind of a breakage?
...
I'm testing a number of classes which manipulate files on disc. I created a number of "mocked" files which I will pass to these classes. The question is where in my directory tree I should save them? I'm using Maven.
...
Hi, I have a following function in Python and I want to test with unittest that if the function gets 0 as argument, it throws a warning. I already tried assertRaises, but since I don't raise the warning, that doesn't work.
def isZero( i):
if i != 0:
print "OK"
else:
warning = Warning( "the input is 0!...
I have the following input element:
<input name='selected(1234)' type="checkbox" />
When I record, I get this:
Command: click
Target: selected(1234)
This doesn't find the element, and neither does
Target: name=selected(1234)
My assumption is that the parentheses are somehow messing with the lookup. What's the proper way to do this...
I am using CuTest for unit testing and would like to get information about code coverage. Are there any code coverage tools available for C?
Thanks
...
I have code that uses MoQ to create a partial stub. I'd prefer to interact with the interface instead of the concrete implementation so that I won't have to modify the unit test if I have a different implementation of the interface.
So for example, I have a factory method such as:
private Mock<ISomeInterface> ISomeInterfaceStubFactory...
Hi everyone,
I'm thinking of designing my own Test library (framework) ->in c++
I am wondering if some of you have already designed there own (and what good advices, documentation they could offer me), decided to not do that (and why), What critics (and argue) you have against differents existing testing frameworks.
I want to no more a...
I'm getting a LazyInitializationException trying to test my DAO methods using the tool stack defined in the title. My understanding is that my test must be running outside the hibernate session, or it has been closed before I try to read children objects from my DAO. From reading the documentation, I understood that using the @Transact...
I am trying to build a googletest unit test for a proof of concept as a new unit testing framework that we could possibly use. In googletest, there are two ways to write a unit test: with a main, or without a main. If you do not define a main, you can link in the gtest_main library, which includes a main() function for you, saving you ...
I want to start with a consistent test environment so I need to reset/clear my preferences. Here's the SetUp for test I have so far. It's not reporting any errors, and my tests pass, but the preferences are not being cleared.
I'm testing the "MainMenu" activity, but I temporarily switch to the OptionScreen activity (which extends Andr...
I have a method which tries to call an in-memory image converter, and if that fails, then tries to do the image conversion on disk. (The in-memory image converter will try to allocate a second copy of the image, so if the original is very large, we might not have sufficient memory for it.)
public BufferedImage convert(BufferedImage img,...
Hello I have a trouble with Ruby unit testing, I'm new to it so some help would be lovely
class TestItem < Test::Unit::TestCase
def setUp
@item=Item.new('Food','Burger',120)
end
def testGetType
assert_equal(@item.getType,'Food')
end
end
Here the value of instance variable @item takes nil when I declare it in setUp() and use it ...
I'm sure I missing something simple here but I can't figure out why my NUnit object comparison test continues to fail.
I have a simple object:
public virtual int Id { get; private set; }
public virtual string Description { get; set; }
public virtual string Address { get; set; }
public virtual string Ports { get; set; }
...
Hi, I am new to testing with JUnit and I need a hint on testing Exceptions.
I have a simple method that throws an exception if it gets an empty input string:
public SumarniVzorec( String sumarniVzorec) throws IOException
{
if (sumarniVzorec == "")
{
IOException emptyString = new IOException("The input...
If I'm not mistaken, NUnit is the de-facto standard for unit testing, but I've just downloaded it, wrote a simple test, and then apparently I have to fire up the GUI and load my .exe assembly, which simply failed.
I tried editing
C:\Program Files (x86)\NUnit 2.5.7\bin\net-2.0\nunit.exe.config
As suggested in this question, but that...
I have setup UnitTests for some of the logic of my iphone app, I followed apple's guide for UnitTests in XCode, however when some of the assertions fail - instead of highlighting the place directly in code like a regular compilation error - XCode just displays the number of errors in the bottom-right corner and I have to look up the erro...
Related Question
My Question:
In the key of ASP.NET-MVC - Do Database Default Values Break The Spirit of Unit Testing?
...
Hi,
I've an XML file in the assets directory of my test application. I want to access this file from my suite method of the test class.
ie.,
public static TestSuite suite(){
InputStream stream = // Some code which returns the asset
}
Any idea how I can do this? I tried with Resources.Resources.getSystem().getAssets() but no luck ...
Is there any way to test a Windows Phone 7 Class library? Usually (for WinForms or WPF applications) I create separate class library and add reference to nunit.framework.dll and to a class library which I want to test.
Here, if I create new Windows Phone class library it doesn’t allow me to add reference to NUnit framework assembly.
I...
It seems to be mainly tailored to .net code.
...