moodmosaic (Nikos Baxevanis)
Blog - About - Open Source - Bookmarks - Tags

Notes from porting Java code to .NET

Saturday, 19 November 2011

Recently I needed to use a DFA/NFA (finite-state automata) implementation from a Java package in .NET. I could not find a port of this particular package and IKVMC was not an option since I preferred to depend only on the standard library (BCL). So, I decided to port the code myself.

In my case, the Java package didn't have unit tests (at least not publicly available on the website). How could I know that the results of the ported code are the same with the original code?

The solution I came up with was the following:

An example can be found here with integration tests for ported code and Java (through IKVMC).

During the process of porting I came across a few differences between Java and .NET and particularly:


Stack Overflow

Java SE 6 Documentation


This post has been filed under #autofixture #fare


Have feedback on this page? Let @nikosbaxevanis know on twitter. Need help or found a bug? Contact me.

© 2011-2018 Nikos Baxevanis. All written content on this site is provided under a Creative Commons ShareAlike license. All code is provided under a MIT license unless otherwise stated.