I have some unit tests that expects the 'current time' to be different than DateTime.Now and I don't want to change the computer's time, obviously. What's the best strategy to achieve this?
Thanks
Hi,
I'd like to write some Python unit tests for my Google App Engine. How can I set that up? Does someone happen to have some sample code which shows how to write a simple test?
Hello,
I have been reading about Unit of Work pattern but I am confused about how the UoW actually persists data.
When we commit the changes, UoW should iterate through the list of Added, Updated and Deleted objects and somehow find a class responsible to Add, Update, Delete objects of a certain type.
I couldn't find an example showing this technique.
Any advice on this would be greatly appreciated.
Mosh
I need to create unit tests for J2EE components like Servlets, Filters and JPA code which would call it's life cycle methods automatically and would integrate with Maven2 and Continuum and can be run from IDE itself.
Can you suggest something?
Thanks,
Vaibhav
Hi everyone !
Does anyone know if there is any tool or a way to apply automated unittesting in report studio and/or framework manager ?
When some regression tests are required and I need to run report by report, on the traditional way, it really bothers me.
Best regards,
Evandro
Is there any tool or framework able to make it easier to "unit test" distributed software written in Java? My system under test is a peer-to-peer software, and I'd like to perform testing using something like PNUnit, but with Java instead of .Net.
Currently I'm using TestNG framework for testing application business logic, i added some Servlet classes recently.
How do I unit test these Servlet classes in TestNg framework?
Is it possible to unit test Entity Framework v2 repositories with SqLite? Is this only possible if my entities are plain Poco and not automatically generated by Entity Framework?
I've generated a entity model from SqlServer and in the generated .edmx file i found this in section SSDL content: Provider="System.Data.SqlClient". Correct me if I am wrong, but shouldnt that be System.Data.SQLite in order to work with sqlite?
I've been reading about MVC in which the authors suggest that testability is one of the major strengths of MVC. They go to compare it with ASP.NET WebForms and how difficult it is to test the code behind in WebForms.
I do understand it's difficult but can someone explain how unit tests were written to test code behind logic in the old days?
Any tips or best practices for unittesting Google Wave robots written in Java? I'm expecting to deploy on AppEngine, if that helps. I'm a fan of TDD but new to both Wave Robots and AppEngine, so I'm hoping to use TDD to help me explore the design space.
How do I Unit Test a MVC redirection?
public ActionResult Create(Product product)
{
_productTask.Save(product);
return RedirectToAction("Success");
}
public ActionResult Success()
{
return View();
}
Is Ayende's approach still the best way to go, with preview 5:
public static void RenderView(this Controller self, string action)
{
typeof(Controller).GetMethod("RenderView").Invoke(self,new object[] { action} );
}
Seems odd to have to do this, especially as the MVC team have said they are writing the framework to be testable.
I'm brand new to Ruby testing and Google isn't helping.
Using Test/Unit, how can I print an instance variable, like
test "thing to happen" do
do_stuff
assert_equal "foo", @variable
p @varible
end
Hey guys,
I am writing some unit tests and I'm getting an exception thrown from my real code when trying to do the following:
string IPaddress = HttpContext.Current.Request.UserHostName.ToString();
Is there a way to mock up an IP address without rewriting my code to accept IP address as a parameter?
Thanks!
The connection string in my app.config for my C# project looks like
Data Source=.\SQLEXPRESS;AttachDbFilename='|DataDirectory|\EIC.mdf';Integrated Security=True;User Instance=True"
I am writing unit tests for the project and have the set the test run configuration to copy the EIC.mdf, but I do am not able to reference the Deployed copy of EIC.mdf to be referenced by the app.config I created for the test project. If I set it to
Data Source=.\SQLEXPRESS;AttachDbFilename='EIC.mdf';Integrated Security=True;User Instance=True"
It still does not find the mdf file.
Hi
I have been trying to set breakpoint in my unit test code using SenTestCase framework in xcode 3.2.2. I can see the build results properly but unable to set a breakpoint.
Anyone having an idea please help.
Our installer program is going to be installing a number of system services, under both Windows and UNIX, using JavaServiceWrapper. There will be a class responsible for creating JavaServiceWrapper config files, installing the services, etc.
Can I have some suggestions on how to unit-test this class?
I want to test my Entities that are built using Entity Framework.
My concern is that using Entity Framework means directly working with data source.
So any ideas how to unittesting Entity Framework based components?
When developing iPhone apps with Xcode 3.2.1/Objective C, which unit test tools are recommended?
I am new to the iPhone OS platform and I am interested in your best practices.
Hey folks
I'm trying to write some unit tests for an app I work on at work (In the vague hope that others might follow suit), and I was originally running these tests using NUnit and the ReSharper plugin.
However, ReSharper will no longer run tests for me for some reason: It simply crosses them out with a red strikeout.
There's no error code I'm afraid, and there's no mention of such behaviour on the JetBrains site.
Has anyone else experienced similar benhaviour?
Cheers, Ed
Isn't it true that every assert statement can be translated to an Assert.IsTrue, since by definition, you are asserting whether something is true or false?
Why is it that test frameworks introduce options like AreEquals, IsNotNull, and especially IsFalse? I feel I spend too much time thinking about which Assert to use when I write unit tests.
Is there any way to simulate the absence of a gem for certain unit tests, short of actually uninstalling and then reinstalling the gem during testing?
I am writing a command line utility, and want to make sure that my tests cover cases where a user may not have all of the gems that I support. For instance, I am using fsevents — a Leopard-specific package for monitoring filesystem events — that will never be present on other systems, as well as a growl gem that's purely optional.
Hallo all,
My director told me that there is a Unit Test framework for Visual Studio from Microsoft, but didn't know what is the name of this tool. Could anyone of you give a hint on it?
Thanks in advance,
John