forked from USIREVEAL/DiscOrDance
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from LucoMoro/DDCommand-test
Add tests for DDCommand + subclasses
- Loading branch information
Showing
7 changed files
with
131 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
" | ||
A DDCommandTest is a test class for testing the behavior of DDCommand | ||
" | ||
Class { | ||
#name : #DDCommandTest, | ||
#superclass : #TestCase, | ||
#category : #'DiscOrDance-Tests-Commands' | ||
} | ||
|
||
{ #category : #test } | ||
DDCommandTest >> testExecute [ | ||
| aCommand | | ||
aCommand := DDCommand new. | ||
self should: [ aCommand execute ] raise: SubclassResponsibility. | ||
] |
15 changes: 15 additions & 0 deletions
15
src/DiscOrDance-Tests/DDExploreCleanedCommandTest.class.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
" | ||
A DDExploreCleanedCommandTest is a test class for testing the behavior of DDExploreCleanedCommand | ||
" | ||
Class { | ||
#name : #DDExploreCleanedCommandTest, | ||
#superclass : #TestCase, | ||
#category : #'DiscOrDance-Tests-Commands' | ||
} | ||
|
||
{ #category : #test } | ||
DDExploreCleanedCommandTest >> testModelType [ | ||
| aCommand | | ||
aCommand := DDExploreCleanedCommand new. | ||
self assert: aCommand modelType equals: #clean. | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
" | ||
A DDExploreCommandTest is a test class for testing the behavior of DDExploreCommand | ||
" | ||
Class { | ||
#name : #DDExploreCommandTest, | ||
#superclass : #TestCase, | ||
#category : #'DiscOrDance-Tests-Commands' | ||
} | ||
|
||
{ #category : #test } | ||
DDExploreCommandTest >> testModelType [ | ||
| aCommand | | ||
aCommand := DDExploreCommand new. | ||
self should: [ aCommand modelType ] raise: SubclassResponsibility. | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
" | ||
A DDExploreCustomCommandTest is a test class for testing the behavior of DDExploreCustomCommand | ||
" | ||
Class { | ||
#name : #DDExploreCustomCommandTest, | ||
#superclass : #TestCase, | ||
#category : #'DiscOrDance-Tests-Commands' | ||
} | ||
|
||
{ #category : #tests } | ||
DDExploreCustomCommandTest >> testModelType [ | ||
| aCommand | | ||
aCommand := DDExploreCustomCommand new. | ||
self assert: aCommand modelType equals: #custom. | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
" | ||
A DDExploreRawCommandTest is a test class for testing the behavior of DDExploreRawCommand | ||
" | ||
Class { | ||
#name : #DDExploreRawCommandTest, | ||
#superclass : #TestCase, | ||
#category : #'DiscOrDance-Tests-Commands' | ||
} | ||
|
||
{ #category : #test } | ||
DDExploreRawCommandTest >> testModelType [ | ||
| aCommand | | ||
aCommand := DDExploreRawCommand new. | ||
self assert: aCommand modelType equals: #raw. | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
" | ||
A DDScrapeCommandTest is a test class for testing the behavior of DDScrapeCommand | ||
" | ||
Class { | ||
#name : #DDScrapeCommandTest, | ||
#superclass : #TestCase, | ||
#category : #'DiscOrDance-Tests-Commands' | ||
} | ||
|
||
{ #category : #test } | ||
DDScrapeCommandTest >> testConfiguration [ | ||
| aCommand aConfiguration | | ||
aCommand := DDScrapeCommand new. | ||
aConfiguration := DDGlobalConfiguration new. | ||
aCommand configuration: aConfiguration. | ||
|
||
self assert: aCommand configuration equals: aConfiguration. | ||
] | ||
|
||
{ #category : #tests } | ||
DDScrapeCommandTest >> testNilConfiguration [ | ||
| aCommand aConfiguration | | ||
aCommand := DDScrapeCommand new. | ||
aConfiguration := nil. | ||
aCommand configuration: aConfiguration. | ||
|
||
self should: [ aCommand configuration ] raise: Error. | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
" | ||
A DDServerCommandTest is a test class for testing the behavior of DDServerCommand | ||
" | ||
Class { | ||
#name : #DDServerCommandTest, | ||
#superclass : #TestCase, | ||
#category : #'DiscOrDance-Tests-Commands' | ||
} | ||
|
||
{ #category : #tests } | ||
DDServerCommandTest >> testNilServerName [ | ||
| aCommand | | ||
aCommand := DDServerCommand new. | ||
"aCommand serverName: nil." "This is not necessary." | ||
|
||
self should: [aCommand serverName] raise: Error. | ||
] | ||
|
||
{ #category : #test } | ||
DDServerCommandTest >> testServerName [ | ||
| aCommand | | ||
aCommand := DDServerCommand new. | ||
aCommand serverName: 'server-name'. | ||
|
||
self assert: aCommand serverName equals: 'server-name'. | ||
|
||
|
||
] |