Skip to content

Commit

Permalink
added a few additional test criteria to message tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jkubuni committed Jun 23, 2024
1 parent e01f34a commit 55b589b
Show file tree
Hide file tree
Showing 12 changed files with 48 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
{
"class" : {
},
"extractPathFrom:" : " 6/23/2024 14:02:55",
"imageFormFrom:" : " 6/23/2024 14:02:55",
"newWith:" : " 6/23/2024 14:02:55" },
"instance" : {
"core" : " 6/23/2024 14:02:55",
"core:" : " 6/23/2024 14:02:55",
"getFormFor:" : " 6/23/2024 14:02:55",
"getFormPromiseFor:" : " 6/23/2024 14:02:55",
"requestImageFor:with:" : "6/22/2024 13:42:57" } }
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
accessing
asSnippet

^ 'Sticker'
^ 'Sticker: ', self stickerId
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"newAnimatedStickerFrom:" : "JK 5/31/2024 11:36",
"newFrom:" : "JK 6/23/2024 11:39" },
"instance" : {
"asSnippet" : "JK 5/16/2024 16:00",
"asSnippet" : "JK 6/23/2024 14:32",
"asText" : "JK 5/16/2024 16:00",
"height" : "JK 5/16/2024 16:01",
"height:" : "JK 5/16/2024 16:01",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
{
"class" : {
"extractPathFrom:" : " 6/23/2024 14:02:55",
"imageFormFrom:" : "JK 6/21/2024 13:46",
"newWith:" : "JK 6/20/2024 22:18" },
"newWith:" : "JK 6/20/2024 22:18",
"stickerFormFrom:" : " 6/23/2024 14:02:55" },
"instance" : {
"core" : " 6/23/2024 14:02:55",
"core:" : " 6/23/2024 14:02:55",
"downloadStickerSet:" : "JK 6/19/2024 11:33",
"getFormFor:" : " 6/23/2024 14:02:55",
"getFormPromiseFor:" : " 6/23/2024 14:02:55",
"getInstalledStickers" : "JK 6/5/2024 11:37",
"loadStickerIds" : "JK 6/20/2024 23:39",
"requestStickerFor:with:" : "JK 5/16/2024 21:40",
"stickerIds" : " 6/23/2024 14:02:55",
"stickerIds:" : " 6/23/2024 14:02:55",
"stickerSets" : "JK 6/19/2024 11:30",
"stickerSets:" : "JK 6/19/2024 11:30",
"storeStickerSet:" : "JK 6/19/2024 11:44" } }
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"class" : {
},
"extractPathFrom:" : " 6/23/2024 14:02:55",
"imageFormFrom:" : " 6/23/2024 14:02:55" },
"instance" : {
"getFormFor:" : " 6/23/2024 14:02:55",
"getFormPromiseFor:" : " 6/23/2024 14:02:55",
"getVideoFor:" : "JK 6/12/2024 19:48",
"getVideoPromiseFor:" : "JK 6/12/2024 19:56" } }
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,17 @@
"addCloseButton" : "JK 5/21/2024 10:22",
"addNextButton" : "JK 6/19/2024 12:03",
"addPreviousButton" : "JK 6/19/2024 12:04",
"buildStickerListItems" : " 6/23/2024 14:02:54",
"buildStickerListItemsFor:" : "JK 6/21/2024 14:07",
"close" : "JK 5/29/2024 20:09",
"collectInstalledStickers" : " 6/23/2024 14:02:54",
"convertWebp:" : "6/22/2024 13:42:57",
"core" : "JK 5/31/2024 14:29",
"core:" : "JK 5/31/2024 14:29",
"downloadStickerSetFrom:" : " 6/23/2024 14:02:54",
"initialize" : "JK 6/20/2024 23:42",
"loadStickers" : " 6/23/2024 14:02:54",
"loadStickersFromStore" : " 6/23/2024 14:02:54",
"selectedChat" : "JK 5/28/2024 10:22",
"selectedChat:" : "JK 5/28/2024 10:23",
"selectedSet" : "JK 6/20/2024 11:39",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ testAnimatedStickerMessageCorrectlyConstructedFromJson
stickerMessageEvent := TCTMMocks mockAnimatedStickerMessageJsonFrom: chat id.
stickerMessage := TCCMessage newFromMessageEvent: stickerMessageEvent in: chat with: self core.

self assert: TCTMMocks mockValidEmoji equals: stickerMessage text.
self assert: TCTMMocks mockValidEmoji equals: stickerMessage text.
self assert: TCTMMocks mockValidEmoji equals: stickerMessage asSnippet.
self assert: TCTMMocks mockValidEmoji equals: stickerMessage asText.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ testPhotoMessageCorrectlyConstructedFromJson
photoMessage := TCCMessage newFromMessageEvent: photoMessageEvent in: chat with: self core.

self assert: TCTMMocks mockText equals: photoMessage caption.
self assert: TCTMMocks mockText equals: photoMessage asText.
self assert: photoMessage hasCaption.
self assert: TCTMMocks mockImageId equals: photoMessage fileId.
self assert: TCTMMocks mockPhotoHeight equals: photoMessage height.
self assert: TCTMMocks mockPhotoWidth equals: photoMessage width.
self assert: TCTMMocks mockPhotoWidth equals: photoMessage width.
self assert: 'Photo: ', TCTMMocks mockText equals: photoMessage asSnippet.
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ testStaticStickerMessageCorrectlyContructedFromJson

self assert: TCTMMocks mockStickerId equals: stickerMessage stickerId.
self assert: TCTMMocks mockStickerWidth equals: stickerMessage width.
self assert: TCTMMocks mockStickerHeight equals: stickerMessage height.
self assert: TCTMMocks mockStickerHeight equals: stickerMessage height.
self assert: 'Sticker: ', TCTMMocks mockStickerId equals: stickerMessage asSnippet.
self assert: 'Sticker' equals: stickerMessage asText.
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ testTextMessageTypeIdentifiedCorrectly
textMessageEvent := TCTMMocks mockMessageJsonFrom: chat id.
textMessage := TCCMessage newFromMessageEvent: textMessageEvent in: chat with: self core.

self assert: TCCTextMessage equals: textMessage class.
self assert: TCCTextMessage equals: textMessage class.
self assert: TCTMMocks mockText equals: textMessage asSnippet.
self assert: TCTMMocks mockText equals: textMessage asText.
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ testVideoMessageCorrectlyConstructedFromJson
self assert: TCTMMocks mockImageId equals: videoMessage thumbnailId.
self assert: TCTMMocks mockPhotoHeight equals: videoMessage height.
self assert: TCTMMocks mockPhotoWidth equals: videoMessage width.
self assert: TCTMMocks mockVideoId equals: videoMessage videoId.
self assert: TCTMMocks mockVideoId equals: videoMessage videoId.
self assert: 'Video: ', TCTMMocks mockText equals: videoMessage asSnippet.
self assert: TCTMMocks mockText equals: videoMessage asText.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"class" : {
},
"instance" : {
"testAnimatedStickerMessageCorrectlyConstructedFromJson" : "JK 6/23/2024 11:49",
"testAnimatedStickerMessageCorrectlyConstructedFromJson" : "JK 6/23/2024 14:35",
"testAnimatedStickerMessageTypeIdentifiedCorrectly" : "JK 6/23/2024 11:45",
"testDocumentMessageCorrectlyConstructedFromJson" : "JK 6/23/2024 12:01",
"testDocumentMessageTypeIdentifiedCorrectly" : "JK 6/23/2024 11:55",
Expand All @@ -17,13 +17,13 @@
"testMessageShouldNotify" : "RS 7/17/2021 10:53",
"testMessageWithMessageSenderChatCorrectlyConstructedFromJson" : "js 7/31/2022 10:29",
"testNotSupportedMessageTypeIdentifiedCorrectly" : "js 7/31/2022 10:29",
"testPhotoMessageCorrectlyConstructedFromJson" : "js 7/31/2022 10:29",
"testPhotoMessageCorrectlyConstructedFromJson" : "JK 6/23/2024 14:31",
"testPhotoMessageTypeIdentifiedCorrectly" : "JK 6/23/2024 11:26",
"testSenderNameInChannelMessage" : "tom.richter 7/25/2021 11:36",
"testSenderNameInNonChannelMessage" : "per 7/17/2021 16:13",
"testStaticStickerMessageCorrectlyContructedFromJson" : "JK 6/23/2024 11:43",
"testStaticStickerMessageTypeIdentifiedCorrectly" : "JK 6/23/2024 11:30",
"testStaticStickerMessageCorrectlyContructedFromJson" : "JK 6/23/2024 14:34",
"testStaticStickerMessageTypeIdentifiedCorrectly" : "JK 6/23/2024 14:34",
"testTextMessageCorrectlyConstructedFromJson" : "js 7/31/2022 10:30",
"testTextMessageTypeIdentifiedCorrectly" : "js 7/31/2022 10:30",
"testVideoMessageCorrectlyConstructedFromJson" : "JK 6/23/2024 11:12",
"testTextMessageTypeIdentifiedCorrectly" : "JK 6/23/2024 14:32",
"testVideoMessageCorrectlyConstructedFromJson" : "JK 6/23/2024 14:31",
"testVideoMessageTypeIdentifiedCorrectly" : "JK 6/23/2024 11:24" } }

0 comments on commit 55b589b

Please sign in to comment.