You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Mikhail Loenko <ml...@gmail.com> on 2006/06/30 13:04:25 UTC

[classlib][testing] question about org.apache.harmony.tests.java.nio.channels.SocketChannelTest

It is not clear why we have assertEquals in this type of constructions

        try {
            assertEquals(CAPACITY_NORMAL, this.channel1.read(buf));
            fail("Should throw ClosedChannelException");
        } catch (ClosedChannelException e) {
            // correct
        }

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: [classlib][testing] question about org.apache.harmony.tests.java.nio.channels.SocketChannelTest

Posted by Mikhail Loenko <ml...@gmail.com>.
2006/6/30, Andrew Zhang <zh...@gmail.com>:
> Hello Mikhail,
>
> Totally agree with you. assertEquals doesn't make any sense here.
>
> I will remove these useless assertEquals in NIO module tests.

Great!



>
> Thanks!
>
>
> On 6/30/06, Mikhail Loenko <ml...@gmail.com> wrote:
> >
> > It is not clear why we have assertEquals in this type of constructions
> >
> >        try {
> >            assertEquals(CAPACITY_NORMAL, this.channel1.read(buf));
> >            fail("Should throw ClosedChannelException");
> >        } catch (ClosedChannelException e) {
> >            // correct
> >        }
> >
> > ---------------------------------------------------------------------
> > Terms of use : http://incubator.apache.org/harmony/mailing.html
> > To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> > For additional commands, e-mail: harmony-dev-help@incubator.apache.org
> >
> >
>
>
> --
> Andrew Zhang
> China Software Development Lab, IBM
>
>

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: [classlib][testing] question about org.apache.harmony.tests.java.nio.channels.SocketChannelTest

Posted by Andrew Zhang <zh...@gmail.com>.
Hello Mikhail,

Totally agree with you. assertEquals doesn't make any sense here.

I will remove these useless assertEquals in NIO module tests.

Thanks!


On 6/30/06, Mikhail Loenko <ml...@gmail.com> wrote:
>
> It is not clear why we have assertEquals in this type of constructions
>
>        try {
>            assertEquals(CAPACITY_NORMAL, this.channel1.read(buf));
>            fail("Should throw ClosedChannelException");
>        } catch (ClosedChannelException e) {
>            // correct
>        }
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>


-- 
Andrew Zhang
China Software Development Lab, IBM