Home » Posts tagged ".net"

C# Properties Get and Set

My son is learning to program.  Last week he asked me to explain C# properties get and set and, as it turns out, it looks like many others are asking for the same.  So, I’ve decided to spend the time on this post, explaining getters and setters in about as much detail as one can expect.

So here it goes…

Continue reading “C# Properties Get and Set”

Running Selenium In Parallel With Any .NET Unit Testing Tool

Running Selenium in parallel from .NET seems to be a problem because, as of the time of this writing, I’ve yet to find a viable way of running selenium test on multiple browsers using Selenium Grid.  This doesn’t mean that there aren’t a few articles out there that have some kind of solution.  But they’ve never satisfied me as something that I could easily plug into my already created test.

While my preferred testing tools are NUnit and SpecFlow, the method I am about to propose should work with any existing test harness you might want to use.  The only prerequisite is that you are using Page Models to wrap your access to any particular web page.

This article assumes that you already:

  • know how to write Selenium tests
  • know how to use Selenium Grid
  • know how to use the Page Model pattern
  • know how to use your chosen test harness.

OK.  On to the main event. Continue reading “Running Selenium In Parallel With Any .NET Unit Testing Tool”

iText IN ACTION – Creating and Manipulating PDF

image

While this isn’t specifically targeted at iTextSharp, which we’ve been covering in recent posts, this is really the closest book you are going to find on the subject.

The basics are the same.  Keep in mind that the main difference is that setPropertyName and getPropertyName methods have been changed to .NET style properties (versus Java style) where it makes sense.  Method names start with a capital letter in iTextSharp, and event wiring is a little funky (we’ll get to that later).

Continue reading “iText IN ACTION – Creating and Manipulating PDF”

.Net String Pool – Not Just For The Compiler

B03B0055 On Monday, I was corrected in my assertion that creating multiple empty strings would create multiple objects.  Turns out the compiler automatically puts all of the strings that are exactly the same in a “string pool” so that there is only ever one empty string in the entire application you’ve created.

Duh! I should have known this, or at least I should have expected that this was so since it has been true with every other compiled language I’ve worked with.

But what I didn’t know and couldn’t expect is that we can make use of this string pool programmatically as well.

Continue reading “.Net String Pool – Not Just For The Compiler”