示例#1
0
 def test_resolve_form_invalid(self):
     # Given
     tag = 'this_is_not_a_valid_form'
     # When
     with self.assertRaises(TypeError) as error:
         _Envelope._resolve_form(tag)
     # Then
     message = error.exception.args[0]
     self.assertEqual(message, 'Invalid form tag: this_is_not_a_valid_form')
示例#2
0
 def test_resolve_form_command(self):
     # Given
     tag = 'command'
     # When
     actual = _Envelope._resolve_form(tag)
     # Then
     self.assertIsInstance(actual, _CommandMessageForm)
示例#3
0
 def test_resolve_form_event(self):
     # Given
     tag = 'event'
     # When
     actual = _Envelope._resolve_form(tag)
     # Then
     self.assertIsInstance(actual, _EventMessageForm)
示例#4
0
 def test_resolve_form_unlinked(self):
     # Given
     tag = 'unlinked'
     # When
     actual = _Envelope._resolve_form(tag)
     # Then
     self.assertIsInstance(actual, _UnlinkedResponseForm)
示例#5
0
 def test_resolve_form_link(self):
     # Given
     tag = 'link'
     # When
     actual = _Envelope._resolve_form(tag)
     # Then
     self.assertIsInstance(actual, _LinkRequestForm)
示例#6
0
 def test_resolve_form_sync(self):
     # Given
     tag = 'sync'
     # When
     actual = _Envelope._resolve_form(tag)
     # Then
     self.assertIsInstance(actual, _SyncRequestForm)