Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

378-add-suffix-Query-for-all-queries-3 #417

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
Class {
#name : #ClyAsyncBrowserQueryCursorTests,
#superclass : #ClyBrowserItemCursorTests,
#name : #ClyAsyncBrowserQueryCursorTest,
#superclass : #ClyBrowserItemCursorTest,
#category : #'Calypso-NavigationModel-Tests'
}

{ #category : #testing }
ClyAsyncBrowserQueryCursorTests class >> shouldInheritSelectors [
ClyAsyncBrowserQueryCursorTest class >> shouldInheritSelectors [
^true
]

{ #category : #running }
ClyAsyncBrowserQueryCursorTests >> createQuery [
ClyAsyncBrowserQueryCursorTest >> createQuery [
^super createQuery semiAsync
]

{ #category : #tests }
ClyAsyncBrowserQueryCursorTests >> testHasQueryResult [
ClyAsyncBrowserQueryCursorTest >> testHasQueryResult [

self assert: cursor queryResult class equals: ClyAsyncBrowserQueryResultAdapter.
self assert: cursor queryResult actualResult equals: queryResult
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
Class {
#name : #ClyAsyncQueryResultTests,
#name : #ClyAsyncQueryResultTest,
#superclass : #ClyQueryResultTestCase,
#category : #'Calypso-NavigationModel-Tests'
}

{ #category : #running }
ClyAsyncQueryResultTests >> createQuery [
ClyAsyncQueryResultTest >> createQuery [

^ClyLongQueryExample from: ClyScopeExample of: String in: environment
]

{ #category : #running }
ClyAsyncQueryResultTests >> createQueryResult [
ClyAsyncQueryResultTest >> createQueryResult [
^ClyAsyncQueryResult new
]

{ #category : #tests }
ClyAsyncQueryResultTests >> testBuildCompletionShouldNotifyItemObservers [
ClyAsyncQueryResultTest >> testBuildCompletionShouldNotifyItemObservers [

| observer cursor |
observer := ClyItemObserverExample new.
Expand All @@ -30,7 +30,7 @@ ClyAsyncQueryResultTests >> testBuildCompletionShouldNotifyItemObservers [
]

{ #category : #tests }
ClyAsyncQueryResultTests >> testBuildCompletionShouldResetProcess [
ClyAsyncQueryResultTest >> testBuildCompletionShouldResetProcess [

queryResult rebuild.
query passExecution.
Expand All @@ -40,7 +40,7 @@ ClyAsyncQueryResultTests >> testBuildCompletionShouldResetProcess [
]

{ #category : #tests }
ClyAsyncQueryResultTests >> testBuildShouldSetUpItemsFromActualResultWhenTheyReady [
ClyAsyncQueryResultTest >> testBuildShouldSetUpItemsFromActualResultWhenTheyReady [

queryResult rebuild.
query passExecution.
Expand All @@ -52,7 +52,7 @@ ClyAsyncQueryResultTests >> testBuildShouldSetUpItemsFromActualResultWhenTheyRea
]

{ #category : #tests }
ClyAsyncQueryResultTests >> testBuildShouldStartBackgroundProcessing [
ClyAsyncQueryResultTest >> testBuildShouldStartBackgroundProcessing [

queryResult rebuild.

Expand All @@ -61,7 +61,7 @@ ClyAsyncQueryResultTests >> testBuildShouldStartBackgroundProcessing [
]

{ #category : #tests }
ClyAsyncQueryResultTests >> testForceLazyRebuildShouldNotResetExistingItems [
ClyAsyncQueryResultTest >> testForceLazyRebuildShouldNotResetExistingItems [

self assert: queryResult items notNil.

Expand All @@ -73,7 +73,7 @@ ClyAsyncQueryResultTests >> testForceLazyRebuildShouldNotResetExistingItems [
]

{ #category : #tests }
ClyAsyncQueryResultTests >> testIsBuiltWhenBuildComplete [
ClyAsyncQueryResultTest >> testIsBuiltWhenBuildComplete [

queryResult rebuild.
query passExecution.
Expand All @@ -83,7 +83,7 @@ ClyAsyncQueryResultTests >> testIsBuiltWhenBuildComplete [
]

{ #category : #tests }
ClyAsyncQueryResultTests >> testItemsChangedNotificationShouldNotResetExistingItems [
ClyAsyncQueryResultTest >> testItemsChangedNotificationShouldNotResetExistingItems [

queryResult items: #(items).

Expand All @@ -94,7 +94,7 @@ ClyAsyncQueryResultTests >> testItemsChangedNotificationShouldNotResetExistingIt
]

{ #category : #tests }
ClyAsyncQueryResultTests >> testItemsChangedNotificationShouldResetItems [
ClyAsyncQueryResultTest >> testItemsChangedNotificationShouldResetItems [
<expectedFailure>
"Async query should not reset own items which was already built.
Another test describes that it should only reset actual result"
Expand All @@ -103,7 +103,7 @@ ClyAsyncQueryResultTests >> testItemsChangedNotificationShouldResetItems [
]

{ #category : #tests }
ClyAsyncQueryResultTests >> testItemsInitializationShouldNotResetExistingItems [
ClyAsyncQueryResultTest >> testItemsInitializationShouldNotResetExistingItems [

queryResult items: #(items).
queryResult initializeItems.
Expand All @@ -112,23 +112,23 @@ ClyAsyncQueryResultTests >> testItemsInitializationShouldNotResetExistingItems [
]

{ #category : #tests }
ClyAsyncQueryResultTests >> testNotBuiltByDefault [
ClyAsyncQueryResultTest >> testNotBuiltByDefault [

queryResult := queryResult class new.

self deny: queryResult isBuilt
]

{ #category : #tests }
ClyAsyncQueryResultTests >> testNotBuiltWhenBuildIsJustStarted [
ClyAsyncQueryResultTest >> testNotBuiltWhenBuildIsJustStarted [

queryResult rebuild.

self deny: queryResult isBuilt
]

{ #category : #running }
ClyAsyncQueryResultTests >> waitBuildComplete [
ClyAsyncQueryResultTest >> waitBuildComplete [
[queryResult buildProcess isNil or: [queryResult buildProcess isTerminated]]
whileFalse: [ 20 milliSeconds wait ]
]
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
Class {
#name : #ClyAsyncQueryTests,
#name : #ClyAsyncQueryTest,
#superclass : #ClyWrapQueryTestCase,
#category : #'Calypso-NavigationModel-Tests'
}

{ #category : #running }
ClyAsyncQueryTests >> createQuery [
ClyAsyncQueryTest >> createQuery [
^ ClyAsyncQuery for: (ClyQueryExampleReturningScopeBasis
from: ClyScopeExample of: self class in: environment)
]

{ #category : #running }
ClyAsyncQueryTests >> queryClass [
ClyAsyncQueryTest >> queryClass [
^ClyAsyncQuery
]

{ #category : #tests }
ClyAsyncQueryTests >> testComparingWithAnotherAsyncQueryWithDifferentAsyncResult [
ClyAsyncQueryTest >> testComparingWithAnotherAsyncQueryWithDifferentAsyncResult [

| anotherQuery |
anotherQuery := query semiAsync.
Expand All @@ -25,14 +25,14 @@ ClyAsyncQueryTests >> testComparingWithAnotherAsyncQueryWithDifferentAsyncResult
]

{ #category : #tests }
ClyAsyncQueryTests >> testConvertingToAsyncQuery [
ClyAsyncQueryTest >> testConvertingToAsyncQuery [

self assert: query async == query

]

{ #category : #tests }
ClyAsyncQueryTests >> testConvertingToSemiAsyncQuery [
ClyAsyncQueryTest >> testConvertingToSemiAsyncQuery [

| convertedQuery |
convertedQuery := query semiAsync.
Expand All @@ -45,13 +45,13 @@ ClyAsyncQueryTests >> testConvertingToSemiAsyncQuery [
]

{ #category : #tests }
ClyAsyncQueryTests >> testHasAsyncResultbyDefault [
ClyAsyncQueryTest >> testHasAsyncResultbyDefault [

self assert: query asyncResult class equals: ClyAsyncQueryResult
]

{ #category : #tests }
ClyAsyncQueryTests >> testPrepareResultForExecution [
ClyAsyncQueryTest >> testPrepareResultForExecution [

| preparedResult |
preparedResult := query prepareNewResult.
Expand All @@ -63,7 +63,7 @@ ClyAsyncQueryTests >> testPrepareResultForExecution [
]

{ #category : #tests }
ClyAsyncQueryTests >> testPrepareResultForExecutionWhenItIsSemiAsync [
ClyAsyncQueryTest >> testPrepareResultForExecutionWhenItIsSemiAsync [

| preparedResult |
preparedResult := query semiAsync prepareNewResult.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Class {
#name : #ClyAsyncRawQueryCursorTest,
#superclass : #ClyRawItemCursorTest,
#category : #'Calypso-NavigationModel-Tests'
}

{ #category : #testing }
ClyAsyncRawQueryCursorTest class >> shouldInheritSelectors [
^true
]

{ #category : #running }
ClyAsyncRawQueryCursorTest >> createQuery [
^super createQuery semiAsync
]

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
Class {
#name : #ClyBrowserItemCursorTests,
#name : #ClyBrowserItemCursorTest,
#superclass : #ClyBrowserQueryCursorTestCase,
#category : #'Calypso-NavigationModel-Tests'
}

{ #category : #running }
ClyBrowserItemCursorTests >> createQueryResult [
ClyBrowserItemCursorTest >> createQueryResult [
^ClyBrowserQueryResultExample new
]

{ #category : #running }
ClyBrowserItemCursorTests >> rawResultItems [
ClyBrowserItemCursorTest >> rawResultItems [
^queryResult items collect: #actualObject
]

{ #category : #tests }
ClyBrowserItemCursorTests >> testAllItems [
ClyBrowserItemCursorTest >> testAllItems [

| allItems unprepared |
allItems := cursor retrieveAll.
Expand All @@ -27,7 +27,7 @@ ClyBrowserItemCursorTests >> testAllItems [
]

{ #category : #tests }
ClyBrowserItemCursorTests >> testHasQueryResult [
ClyBrowserItemCursorTest >> testHasQueryResult [

self assert: cursor queryResult equals: queryResult
]
Loading