'When passed a C{transportSemantics} paramter, C{\'TCP\'} (the value
present in L{IPv4Address.type} to indicate a stream transport) maps to
C{SOCK_STREAM} and C{\'UDP\'} maps to C{SOCK_DGRAM}.'

def test_transportSemanticsToSocketType(self):

    receiver = ResultHolder(self)
    self.resolver.resolveHostName(receiver, u'example.com', transportSemantics='TCP')
    receiver2 = ResultHolder(self)
    self.resolver.resolveHostName(receiver2, u'example.com', transportSemantics='UDP')
    self.doThreadWork()
    self.doReactorWork()
    self.doThreadWork()
    self.doReactorWork()
    (host, port, family, socktypeT, proto, flags) = self.getter.calls[0]
    (host, port, family, socktypeU, proto, flags) = self.getter.calls[1]
    self.assertEqual(socktypeT, SOCK_STREAM)
    self.assertEqual(socktypeU, SOCK_DGRAM)
