//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldCloseConnectionOnInvalidHandshake() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void ShouldCloseConnectionOnInvalidHandshake() { // GIVEN Connection.connect(_address); // WHEN Connection.send(new sbyte[] { unchecked (( sbyte )0xDE), unchecked (( sbyte )0xAD), unchecked (( sbyte )0xB0), ( sbyte )0x17, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }); // THEN Exception.expect(typeof(IOException)); Connection.recv(4); }