'Any file descriptors added to the reactor have their C{connectionLost}
called when C{reactor.stop} is called.'

def test_connectionLostOnShutdown(self):

    reactor = self.buildReactor()
    class DoNothingDescriptor(FileDescriptor, ):
        def doRead(self):
            return None
        def doWrite(self):
            return None
    (client, server) = self._connectedPair()
    fd1 = DoNothingDescriptor(reactor)
    fd1.fileno = client.fileno
    fd2 = DoNothingDescriptor(reactor)
    fd2.fileno = server.fileno
    reactor.addReader(fd1)
    reactor.addWriter(fd2)
    reactor.callWhenRunning(reactor.stop)
    self.runReactor(reactor)
    self.assertTrue(fd1.disconnected)
    self.assertTrue(fd2.disconnected)
