Skip to content

Commit

Permalink
Merge pull request #97 from hpi-swa-teaching/tests
Browse files Browse the repository at this point in the history
wrote tests vor unsupported Errors
  • Loading branch information
JanFehse committed Jun 24, 2022
2 parents 4bf0ea4 + eeb721b commit fb433fd
Show file tree
Hide file tree
Showing 12 changed files with 201 additions and 0 deletions.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
tests
testSpecGetSelectedUnsupported

|pluggableTreeSpec bool|

pluggableTreeSpec := MEXPluggableMultiSelectionTreeSpec new.
bool := false.
[pluggableTreeSpec getSelected: nil]
on: MEXUnsupportedError
do: [:error| bool := true].
self assert: bool equals: true.

bool := false.
[pluggableTreeSpec getSelected]
on: MEXUnsupportedError
do: [:error| bool := true].
self assert: bool equals: true.


Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
tests
testSpecSetSelectedPathUnsupported

|pluggableTreeSpec bool|

pluggableTreeSpec := MEXPluggableMultiSelectionTreeSpec new.
bool := false.
[pluggableTreeSpec setSelectedPath: nil]
on: MEXUnsupportedError
do: [:error| bool := true].
self assert: bool equals: true.

bool := false.
[pluggableTreeSpec setSelectedPath]
on: MEXUnsupportedError
do: [:error| bool := true].
self assert: bool equals: true.


Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
tests
testSpecautoDeselectUnsupported

|pluggableTreeSpec bool|

pluggableTreeSpec := MEXPluggableMultiSelectionTreeSpec new.
bool := false.
[pluggableTreeSpec autoDeselect: nil]
on: MEXUnsupportedError
do: [:error| bool := true].
self assert: bool equals: true.

bool := false.
[pluggableTreeSpec autoDeselect]
on: MEXUnsupportedError
do: [:error| bool := true].
self assert: bool equals: true.


Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
tests
testSpecdragItemUnsupported

|pluggableTreeSpec bool|

pluggableTreeSpec := MEXPluggableMultiSelectionTreeSpec new.
bool := false.
[pluggableTreeSpec dragItem]
on: MEXUnsupportedError
do: [:error| bool := true].
self assert: bool equals: true.

bool := false.
[pluggableTreeSpec dragItem: nil]
on: MEXUnsupportedError
do: [:error| bool := true].
self assert: bool equals: true.

bool := false.
[pluggableTreeSpec dropAccept: nil]
on: MEXUnsupportedError
do: [:error| bool := true].
self assert: bool equals: true.

bool := true.
[pluggableTreeSpec dropAccept]
on: MEXUnsupportedError
do: [:error| bool := true].
self assert: bool equals: true.


Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
tests
testSpecdropAcceptUnsupported

|pluggableTreeSpec bool|

pluggableTreeSpec := MEXPluggableMultiSelectionTreeSpec new.
bool := false.
[pluggableTreeSpec dropAccept: nil]
on: MEXUnsupportedError
do: [:error| bool := true].
self assert: bool equals: true.

bool := false.
[pluggableTreeSpec dropAccept]
on: MEXUnsupportedError
do: [:error| bool := true].
self assert: bool equals: true.


Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
tests
testSpecdropItemUnsupported

|pluggableTreeSpec bool|

pluggableTreeSpec := MEXPluggableMultiSelectionTreeSpec new.
bool := false.
[pluggableTreeSpec dropItem: nil]
on: MEXUnsupportedError
do: [:error| bool := true].
self assert: bool equals: true.

bool := false.
[pluggableTreeSpec dropItem]
on: MEXUnsupportedError
do: [:error| bool := true].
self assert: bool equals: true.


Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
tests
testSpecsetSelectedParentUnsupported

|pluggableTreeSpec bool|

pluggableTreeSpec := MEXPluggableMultiSelectionTreeSpec new.
bool := false.
[pluggableTreeSpec setSelectedParent: nil]
on: MEXUnsupportedError
do: [:error| bool := true].
self assert: bool equals: true.

bool := false.
[pluggableTreeSpec setSelectedParent]
on: MEXUnsupportedError
do: [:error| bool := true].
self assert: bool equals: true.


Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
tests
testSpecsetSelectedUnsupported

|pluggableTreeSpec bool|

pluggableTreeSpec := MEXPluggableMultiSelectionTreeSpec new.
bool := false.
[pluggableTreeSpec setSelected: nil]
on: MEXUnsupportedError
do: [:error| bool := true].
self assert: bool equals: true.

bool := false.
[pluggableTreeSpec setSelected]
on: MEXUnsupportedError
do: [:error| bool := true].
self assert: bool equals: true.


Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
tests
testkonstantsAreSet

|pluggableTree|

pluggableTree := MEXPluggableMultiSelectionTreeMorph new.
self assert: (pluggableTree basicKeyPressed: 'a') equals: true.
self assert: (pluggableTree keyStroke: nil) equals: true.
self assert: (pluggableTree handlesMouseOver: nil) equals: true.
self assert: (pluggableTree specialKeyPressed: nil) equals: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"class" : {
},
"instance" : {
"testSpecGetSelectedUnsupported" : "JF 6/24/2022 11:47",
"testSpecSetSelectedPathUnsupported" : "JF 6/24/2022 11:45",
"testSpecautoDeselectUnsupported" : "JF 6/24/2022 11:42",
"testSpecdragItemUnsupported" : "JF 6/24/2022 11:40",
"testSpecdropAcceptUnsupported" : "JF 6/24/2022 11:41",
"testSpecdropItemUnsupported" : "JF 6/24/2022 11:42",
"testSpecsetSelectedParentUnsupported" : "JF 6/24/2022 11:44",
"testSpecsetSelectedUnsupported" : "JF 6/24/2022 11:44",
"testkonstantsAreSet" : "JF 6/24/2022 11:23" } }
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"category" : "MorphicAPIExplorer-Tests",
"classinstvars" : [
],
"classvars" : [
],
"commentStamp" : "",
"instvars" : [
],
"name" : "MEXPluggableMultiSelectionTreeMorphTests",
"pools" : [
],
"super" : "MEXTestCaseForUI",
"type" : "normal" }

0 comments on commit fb433fd

Please sign in to comment.