JunitTests only for the 4 interfaces in Tests?

Dear Team,

I just started the project.

I just want to make sure if we only need to write Junit Tests for all the functions (which are supposed to be implemented in the implementation part) in the four interfaces (Host, IPV4Address, Uri, UriParser) in the tests package?

Do we need to look at the four Implementations for this Junit task?

Do we need to create a new class under the Java package uri.tests…? we are not supposed to write our tests code in SimpleTests, right?

Are there any hints or suggestions, in which kind of order should we write our tests? (Host-> IPV4Address-> Uri-> UriParse ? )?

Thanks in advance

You should write tests for the whole project.
Therefore, your task is to write tests regarding all aspects of the specification.
As only the interfaces and factory is exposed, you can only write tests interfacing with them.

To quote the project description:

You must only use the provided interfaces Uri, IPv4Address, Host and UriParser, from the package uri. Especially your own classes from the package uri.implementation and other custom packages cannot be used. Furthermore, an additional class UriParserFactory is given by us.

What implementations do you mean?

To quote the project description:

It is irrelevant whether you do so in a single or multiple classes.

But for better readability, you might want to use multiple classes.

It is up to you how you structure your tests.
In the end, you should test against the whole specification.

What implementations do you mean?
the four under the Implementations package…as I looked them through…it seems that they only implement the four interfaces under the uri.tests package…so the tests should cover all the functions in the interfaces…cuz as I tried to create any class from the implementations package for my tests…it would always show me the constructor is undefined…did I do something wrong (although the class
Hostimplementation is public)?
image
image

The error is probably due to missing imports.
But:

You are not allowed to use implementations in the tests as they are only a suggestion and our implementations might have a different structure.

To kick-start you, we already set
up the package uri.implementation that already contains concrete classes for the Uri, Host and IPv4Address
interfaces

1 Like

Yes, I think that’s the reason why it would not work:

thanks for your prompt help and your patience :+1: