unit

ruby unit testing framework UI

Hi , Is there an inbuilt UI support in the ruby unit test framework. Can i show the results of my unit test in UI? regards ...

unit testing application layers

I have a 3-tier application with Data access, service and presentation tiers. Where should i place the unit tests? On each layer? one presentation layer? regards. Josh ...

How can I pass a solution resource as a FileStream object (to an intercepted File.Open command)?

I extend upon a legacy library which accesses files on the harddrive. I have such files as embedded resources in my unit test project. I have ported parts of the library to accept streams, which allows me to use GetManifestResourceStream to pass my embedded resource to the legacy library. This works fine, but it is a slight hassle. And...

What kind of unit test do I use for a Silverlight class library (non UI)

Hello! I have a solution built up of several projects. One is a Silverlight 4 application library used for the ViewModel. This contains no UI code so I have no need for UI specific testing. I Only want to test the logic in the ViewModel. Can I use a normal Unit test project in Visual Studio or do I need to go down the Silverlight Unit ...

Running boost unit test console applications as part of Teamcity build

In our application, there are a bunch of unit test console applications that have been written using the boost unit test framework. These test applications form part of the Visual Studio Solution (we are using VS2008 Professional). Is it possible to run these as part of a Teamcity build? So far I have configured Teamcity to check out ...

Unit testing using diff

I have a program where the input is a complex file and the output is a changed file but in the same format. These files are of points and connections in 3D models. I need to be able to unit test this program without checking files line by line myself for equality. Something like a version control 'diff' would be ideal in terms of viewing...

Scala: Why can I convert Int to Unit?

Hi folks! I've recently started playing with Scala (2.8) and noticed the I can write the following code (in the Scala Interpreter): scala> var x : Unit = 10 x : Unit = () It's not obvious what's going on there. I really didn't expect to see any implicit conversion to Unit. ...

ASP.NET MVC Unit Testing and HttpContext

ASP.NET MVC has come a long way (compared to webforms) in becoming a unit testable framework. However, we are often faced with some remaining pigs like FormsAuthentication, which I usually wrap in some type of UserSession object to keep it clean and testable. The other day I realized I was using Server.MapPath in my controller action, an...

How test(junit) input keyboard in Java.

Hi Everyone, i need make a test unit for a input keyboard in Java, Exists any way easy to do it? Thanks. ...

Testing radio buttons using MvcContrib.TestHelper.WatiN

I've been able to use MvcContrib.TestHelper.WatiN to unit test textboxes and drop-downs, but have been unable to get it to work with radio buttons. I keep getting an exception stating that the HTML Element cannot be found, however, I've checked and the name is correct in the source. Does anyone know of an example using MvcContrib.TestH...

Testing a Class with Flows

Hi, I am interested in the best way to write unit tests for a class whose public API involves some kind of a flow, for example: public class PaginatedWriter { public void AppendLine(string line) { ... } public IEnumerable<string> GetPages() { ... } public int LinesPerPage { get; private set; } } This class paginates text lines into t...

NUnit - assembly that reads and writes file

I am unit testing an assembly that uses File.WriteAllLines() and File.ReadAllText() to read and write persistent data. When I run the unit test with the NUnit Gui the test fails with an unauthorizedAccessException. The path that the file is attempting to read and write is being affected of course by the location of program execution. ...

How to mock HttpClientCertificate?

I am trying to unit test an action filter I wrote. I want to mock the HttpClientCertificate but when I use MOQ I get exception. HttpClientCertificate doesnt have a public default constructor. code: //Stub HttpClientCertificate </br> var certMock = new Mock<HttpClientCertificate>(); HttpClientCertificate clientCertificate = certMock.Obj...

difference between integration testing and functional testing

Is functional testing and Integration testing same?? You begin your testing through unit testing... Then after completing unit testing you go for Integration testing where testing the system as a whole. So is functional testing same as Integration testing as in functional testing also, we take the system as a whole and test it for funct...

Unit Testing Mock/Stub definitions in Moq

Any reading or advice I've been given on Unit Testing has always suggested a distinct difference between the definition of a Mock and a Stub. My current understanding of these definitions are as follows Mock: A fake which will be used in your test to make a final assertion Stub: A fake which will be used in your test to isol...

How do you convert between the different types of .Net System.Web.UI.WebControls.Unit?

You create a WebControl with a specified width. In it, there are 3 parts. The left part must be left-justified and has its own width. The right part must be right-justified and has its own width. The final middle part must take up the remaining width and must get its width from the other 3 widths. Since the widths must be specified ...

How to make a RTA analyser in Iphone

Hi Guys I want to make a RTA for audio. I will try it by the aurioTouch sample code but i did not able to make that actual RTA, I want to make RTA on the basis of octave and 1/3 Octave. Please suggest me the right way. Thanks, KD ...

C# - Unit test, Mock?

The builtin unit test generator(VS) for the target classes should that be used or should I learn myself how to write a unit test? And whats this "Mock" thing? I hear it over and over but none cares to give a god damn explanation.. Thanks in advance. ...

Windows C++ unit testing: testing dll-exported class

Hi everyone, I have a new native C++ class that I want to test. It is exported from a dll (project consists of 1 exe and a lot of dll) What's better: to test it through static linking or through dynamic linking? What do you usually do in your projects? The problem is that in the project that I am working on it will take a lot of time ...

what are the various test cases in unit testing

Hello, thanks to help me before. now i m facing the problem of test cases in unit testing so please if u have any idea or example of various test cases of unit testing then provide me. ...