unit

How to perform Unit Testing for Business Objects in asp.net

Unit Testing for Business Object ...

Delphi Unit local variables - how to make each instance unique?

Ok, this, I'm sure is something simple that is easy to do. The problem : I've inherited scary spaghetti code and am slowly trying to better it when new features need adding - generally when a refactor makes adding the new feature neater. I've got a bunch of code I'm packing into a single unit which, in different places in the appli...

How to add tests from test result to test list in visual studio?

For example, I have 1000 tests. I run them and 200 fail. I want to create a test list for the 200 failed list. What is the fastest way to do it? Thanks guys. ...

Convert System.Web.UI.WebControls.Unit to int in c#

How can I convert from an ASP.NET Unit structure to int in c#? Or reverse? ...

Best practice for naming unit and integration test methods?

The title says it all. I've recently inherited an application that is written by different people at different times and looking for guidance on how to standardize. ...

Flex Unit testing of library and mxml using FlexUnit

Hi, I have some software classes(library) to run commands on any mxml file. These classes(library) are wrapped in a SWC file. This SWC file is referenced by any sample mxml application (by adding as SWC file). My problem is that I want to test these software classes(library) against my sample mxml file using FlexUnit. That is, I should ...

Emma - Block Coverage vs Line Coverage

I have a strange scenario... while doing a EMMA coverage for UT, I get the total block coverage size more than line coverage size. For block coverage, the total size is some 50,000 while the line coverage is out of 18,000. I get (block-coverage-value) / 50,000 and (line-coverage-value) / 18,000 in the report. Is it possible? How can t...

How to use Messageboxes in MVVM?

It seems that the XAML in MVVM pattern has difficulty to pop-up a Messageboxes. My client insists that the validation labels and colors are not good for them. They still want a messagebox. How can do it? I know I can pop-up messageboxes in the view-model, but it violates the whole purpose for the view-model. I can also raise a error, an...

I need to upload files in tomcat 5.5.28 in a network unit

Hi Basically i have an aplication deployed over tomcat 5.5.28 , i need put the files that the applicatio upload in a network unit in a shared folder. I know how make the configuration at web.xml level . I've not never upload file in the shared folder over the netwok unit....is it possible....? ...

Django unit testing: South-migrated DB works in MySQL, throws duplicate PK error in PostGreSQL. Am I missing something or is this a bug?

Hi folks, (Worth starting off with a disclaimer: I'm very new to PostGreSQL) I have a django site which involves a standard app/tests.py testing file. If I migrate the DB to MySQL (through South),, the tests all pass. However in PostGresQL, I'm getting the following error: IntegrityError: duplicate key value violates unique constrain...

How do I test UrlHelper.RouteUrl()?

I'm having a tough go trying to figure out what I need to mock in my tests to show that UrlHelper.RouteUrl() is returning the right URL. It works, but I'd like to have the right test coverage. The meat of the controller method looks like this: var urlHelper = new UrlHelper(ControllerContext.RequestContext); return Json(new BasicJsonMess...

Unit Testing during maintenance phase

Our project is currently under maintenance. We have never had unit testing for this project. We were planning on writing unit test for the delta's rather than writing unit test for the entire application. What would be the preferred approach. Does it really add value to add unit testing during the maintenance phase ??? We are still with ...

Finding data file location while using Microsoft Test Framework

I have been using NUnit and now I am switching to the Microsoft Unit Test frame work. In my test project I have a folder called TestData and I kept all my test input data files there. I want to use that files for my unit testing. In my test code, I am using Application name space and assembly name space but I can not get to the data fold...

What is the best approach for unit testing/integration testing GXT code?

I have been tasked to setup a continuous integration environment for a GXT 2.1.1 and GWT 2.0.1 environment. Unfortunately I am new to AJAX and Web Services and have little idea how to setup unit tests in the browser environment. Unit tests for the server backend I already have done, since I am a pro at that. GXT is not quite pure GWT ...

iPhone Unit Testing

Hi guys, I finished my project on an iPhone dev at uni WITHOUT doing "useful" unit testing (did some simple ones just to put on my report). I was looking at the apple's unit testing suits (logic and application tests) but ended up using iPhoneUnitTesting from google-toolbox-for-mac, which I found more documented and easy to get starte...

junit mock objects

i am new to junit so any help is appreciated. I have a class called sysconfig.java for which i have written a junit class file called TestSysconfig.java that tests some methods in the sysconfig.java. The method that i am testing in sysconfig.java calls another class file "ethipmapping.java" i have created a mock of this class file as T...

unit testing methods with arrays as argument

I am porting over some C++ assembly to VB that performs demodulation of various waveforms. I decided to go the unit test route instead of building a test app to get a feel for how testing is performed. The original demodulation code accepts an array that is the waveform along with some other arguments. How should one go about performi...

How to go about adding unit tests to an established (autotools) C project

I have a fork of openssh with some new features and want to write some unit tests to make sure they work at build. Grafting Check into openssh's autotools configuration is diffacult (because I don't really understand autotools) Is there an easier to use C unit test framework? One less closely tied to autotools? How about a better way o...

Unity interception behind the scenes

I wonder how Unity interception works behind the scenes? I mean interface,transparent proxy and virtual method proxy interceptors implementation. Anyone could shed some light on this? ...

How to select some of test cases to compose the BAT test(build acceptance test)?

In junit test, should I create another test suite named as ExampleBAT to do this, and this test suite contains the selected test cases? Thanks. ...