[sip-comm-dev] Order of Test Metods


#1

Hi everybody
I have problem for my recent tests. I needed to order them - I saw how it is done in other tests.
The target TestCase is TestAccountInstallation. I created a static method suite() and ordered there my methods
And than in IcqProtocolProviderSlick I changed the following line :
    addTestSuite(TestAccountInstallation.class);
became
    addTest(TestAccountInstallation.suite());

But this way after registering the account and quering services for protocol provider there is no result and tests fail with the following reason :
    "No Protocol Provider was found for ICQ UIN:......"

Any ideas what is wrong ?

Here is the source of the static suite method :

public static Test suite()
    {
        TestSuite suite = new TestSuite();
        suite.addTest(
            new TestProtocolProviderServiceIcqImpl("testRegisterUrongUsername"));
        suite.addTest(
            new TestProtocolProviderServiceIcqImpl("testRegisterUrongPassword"));
        suite.addTest(
            new TestProtocolProviderServiceIcqImpl("testInstallAccount"));

        return suite;
    }

···

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#2

Hello Damian,

In your suite() method.

suite.addTest(
            new TestProtocolProviderServiceIcqImpl("testInstallAccount"));

should be:

suite.addTest( new TestAccountInstallation("testInstallAccount"));

I remember losing myself many frustrating hours over exactly the same error once.

Cheers
Emil

Damian Minkov wrote:

···

Hi everybody
I have problem for my recent tests. I needed to order them - I saw how it is done in other tests.
The target TestCase is TestAccountInstallation. I created a static method suite() and ordered there my methods
And than in IcqProtocolProviderSlick I changed the following line :
    addTestSuite(TestAccountInstallation.class);
became
    addTest(TestAccountInstallation.suite());

But this way after registering the account and quering services for protocol provider there is no result and tests fail with the following reason :
    "No Protocol Provider was found for ICQ UIN:......"

Any ideas what is wrong ?

Here is the source of the static suite method :

public static Test suite()
    {
        TestSuite suite = new TestSuite();
        suite.addTest(
            new TestProtocolProviderServiceIcqImpl("testRegisterUrongUsername"));
        suite.addTest(
            new TestProtocolProviderServiceIcqImpl("testRegisterUrongPassword"));
        suite.addTest(
            new TestProtocolProviderServiceIcqImpl("testInstallAccount"));

        return suite;
    }

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#3

Yes my mistake. Really stupid copy-paste mistake .
thanks once again :))

Emil Ivov wrote:

···

Hello Damian,

In your suite() method.

suite.addTest(
            new TestProtocolProviderServiceIcqImpl("testInstallAccount"));

should be:

suite.addTest( new TestAccountInstallation("testInstallAccount"));

I remember losing myself many frustrating hours over exactly the same error once.

Cheers
Emil

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net