Web Service Tests

Finally, we get to the point of hooking the whole thing up and using the functionality that we built previously through the Web service. The first test we will write is to verify the id field, just as we did previously with the stub and database versions. We will need a Recording inserted into the database just as we did with the database tests. Here is the first test:


public alass CatalogGatewayFixture : RecordingFixture {

private CatalogGateway gateway = new CatalogGateway(); private ServiceGateway.RecordingDto dto;


public new void SetUp() {

dto = gatewry.FindByRecordingId(Recording.Id);

Assert.AreEqual(Recording.Id, dto.id);

As you can see, the tests do follow a similar pattern. We retrieve a RecordingDto, in this case from a class named CatalogGateway, and vebfy thaS what was inserted into the database matches what is in the RecordingDto. Lets work on getting this to compile and run.

0 0

Post a comment