21 lines
673 B
Smalltalk
21 lines
673 B
Smalltalk
"
|
|
A MessagesCollectionTest is a test class for testing the behavior of MessagesCollection
|
|
"
|
|
Class {
|
|
#name : #TwitterMessagesTest,
|
|
#superclass : #TestCase,
|
|
#category : #'Dataviz-Tests'
|
|
}
|
|
|
|
{ #category : #tests }
|
|
TwitterMessagesTest >> testMessagesSplitSize [
|
|
"I test that a well splited collection will be diveded into disjunt subcollections
|
|
that sum the size of the original collection."
|
|
| testFileUrl testObject |
|
|
testFileUrl := 'https://ia801506.us.archive.org/31/items/offrayLC-tweets/tweets/2012_03.js'.
|
|
testObject := TwitterMessages new
|
|
importFromJSONRemoteFile: testFileUrl.
|
|
self assert:
|
|
(testObject sumSplittedSizes) equals: testObject messages size
|
|
]
|