Did industrial placement with Lloyds TSB 2003-2004
Coding Cobol 74, editing code written before I was born!
Graduated Software Engineering BEng 2005
Joined BT graduate scheme
readme.txt
SDK to access BT Web Services in .NET C#
Worked with customers to build prototypes against BT Web Services
RESTful website using Ruby on Rails
SIP Application Server to support BT Web Services using Java
IVR Web Service using SIP A/S using Java
Website using PHP
Unit Testing
Tests a unit of code (e.g. a method)
Doing the simplest thing that could possibly work
Living documentation
Allows refactoring
Assert upon the correctness of the application
@Test public void testHelloWorld(){ // setup HelloWorld helloWorld = new HelloWorld(); // act String result = helloWorld.sayHello(); // assert assertEquals("Hello", result); }
package com.iclutton.seday;
public class HelloWorld {
public String sayHello() {
return language.sayHello();
}
}
Benefits unit testing
Makes code cleaner
Interfaces
package com.iclutton.seday.language; public interface Language { String sayHello(); } package com.iclutton.seday.language; public class English implements Language{ @Override public String sayHello() { return "Hello"; } } package com.iclutton.seday.language; public class French implements Language{ @Override public String sayHello(){ return "Bonjour"; } }
Mocking
Useful when you want to ‘mock’ out external dependencies
Databases
Web services
Etc
Useful for simulating error conditions and handling
0 comments
Post a comment