Mar28

Parameterized tests with Pex.

Tags: .NET
Until now all we did was letting Pex do the automatic testing, that is letting it look for unwanted-erroneous exceptions in out code, but we did not “instruct” it to check the logic in our code. No we are going to complete some of the tests to check it by the means of using asserts and assumptions.
First of all, let’s see how Pex generates t... [Read More]

Mar20

Preconditions with Pex. Enhancing our code

Tags: .NET
One of the advantages that Pex has is that it automatically reviews all the executing paths of the code you type, and so, it helps you in building a better, more defensive code.
For example, if we do a very simple function like this:
public int MethodToBeTested(int i, int j) {             return i / j; }
 
When you ... [Read More]

Mar16

Starting with PEX

Tags: .NET, Arquitectura
Hi, this means to be the first of a series of posts about PEX and Moles. They conform a test suite intended to make life easier to the developers, they work on both VS2008 and VS2010, Acordding to their site:
Pex automatically generates test suites with high code coverage. Right from the Visual Studio code editor, Pex finds interest... [Read More]

Feb23

Tools and Tips for HTML Integration

Tags: Internet, Proyectos, User Experience
One of our weak points usually is the design integration tasks, if you are lucky you can have a very skilled web designer that gives you a cool cross-browser compatible markup that fits perfectly in your application, but most of the times you’re lucky if the HTML works perfectly in the plain html file and almost never the designer will be able t... [Read More]

Feb21

Disabling input validation in MVC2 using ASP.NET 4.0 (Part II)

Tags: .NET
This is the second part of “Disabling input validation in MVC2 using ASP.NET 4.0”, in the first part we saw how to disable the input validation, to upload, for example, html code.
The problem with that is that we disabled the validation for all fields in the form, so all the other fields (that might not contain html) can be “hacked” with htm... [Read More]

Feb08

Disabling input validation in MVC2 using ASP.NET 4.0

Tags: .NET, Arquitectura
Imagine you need to make a web page in which you can edit HTML and send it back to the server (an html editor), so you place the input and when you submit the form, the famous “A potentially dangerous Request.Form value was detected from the client” error rises, so you try the old way and you set the input validation to false in the page.
No... [Read More]

Feb03

MOSS cache in https sites

Tags: .NET, MOSS/WSS
There is quite odd behavior with MOSS cache: Imagine you create a site with two areas, one that can be accessed by http and one which must be accessed using https.
So you need to enable https in your site, etc… Alright, so how do you make the users access the secure zone by using https, you do two things:
You link to the secure zon... [Read More]

 Next >>