-
Notifications
You must be signed in to change notification settings - Fork 16
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 #23 from sahedAnis/master
Removing Phrase library
- Loading branch information
Showing
7 changed files
with
89 additions
and
0 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
src/Citezen-Rendering.package/CZTextTest.class/instance/library.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,4 @@ | ||
tests | ||
library | ||
|
||
^ BibPhraseLibrary default |
14 changes: 14 additions & 0 deletions
14
src/Citezen-Rendering.package/CZTextTest.class/instance/testSequenceWithInitiator.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,14 @@ | ||
tests | ||
testSequenceWithInitiator | ||
|
||
| p library visitor | | ||
library := self library. | ||
p := BibSequencePhrase new | ||
addField: #author; | ||
initiatorText: 'In '; | ||
yourself. | ||
visitor := BibTextRenderer new. | ||
visitor render: p for: entry. | ||
self | ||
assert: visitor contents | ||
equals: 'In St\''ephane Ducasse and Damien Pollet' |
15 changes: 15 additions & 0 deletions
15
src/Citezen-Rendering.package/CZTextTest.class/instance/testSequenceWithSeparator.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 @@ | ||
tests | ||
testSequenceWithSeparator | ||
|
||
| p library visitor | | ||
library := self library. | ||
p := BibSequencePhrase new | ||
addField: #author; | ||
addField: #title; | ||
separatorText: ', '; | ||
yourself. | ||
visitor := BibTextRenderer new. | ||
visitor render: p for: entry. | ||
self | ||
assert: visitor contents | ||
equals: 'St\''ephane Ducasse and Damien Pollet, Fingerprints' |
15 changes: 15 additions & 0 deletions
15
src/Citezen-Rendering.package/CZTextTest.class/instance/testSequenceWithTerminator.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 @@ | ||
tests | ||
testSequenceWithTerminator | ||
|
||
| p library visitor | | ||
library := self library. | ||
p := BibSequencePhrase new | ||
addField: #author; | ||
initiatorText: 'In '; | ||
terminatorText: '!'; | ||
yourself. | ||
visitor := BibTextRenderer new. | ||
visitor render: p for: entry. | ||
self | ||
assert: visitor contents | ||
equals: 'In St\''ephane Ducasse and Damien Pollet!' |
15 changes: 15 additions & 0 deletions
15
src/Citezen-Rendering.package/CZTextTest.class/instance/testSequenceWithoutSeparator.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 @@ | ||
tests | ||
testSequenceWithoutSeparator | ||
|
||
| p library visitor | | ||
library := self library. | ||
p := BibSequencePhrase new | ||
addField: #author; | ||
addField: #title; | ||
initiatorText: 'In '; | ||
yourself. | ||
visitor := BibTextRenderer new. | ||
visitor render: p for: entry. | ||
self | ||
assert: visitor contents | ||
equals: 'In St\''ephane Ducasse and Damien PolletFingerprints' |
14 changes: 14 additions & 0 deletions
14
...en-Rendering.package/CZTextTest.class/instance/testVisitEntryWithFieldProducesContents.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,14 @@ | ||
tests | ||
testVisitEntryWithFieldProducesContents | ||
|
||
| p library visitor | | ||
library := self library. | ||
p := BibSequencePhrase new | ||
addField: #author; | ||
terminatorText: ' (Cool.)'; | ||
yourself. | ||
visitor := BibTextRenderer new. | ||
visitor render: p for: entry. | ||
self | ||
assert: visitor contents | ||
equals: 'St\''ephane Ducasse and Damien Pollet (Cool.)' |
12 changes: 12 additions & 0 deletions
12
...zen-Rendering.package/CZTextTest.class/instance/testVisitEntryWithNoFieldProducesEmpty.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,12 @@ | ||
tests | ||
testVisitEntryWithNoFieldProducesEmpty | ||
|
||
| p library visitor | | ||
library := self library. | ||
p := BibSequencePhrase new | ||
addField: #editor; | ||
terminatorText: ' (Ed.)'; | ||
yourself. | ||
visitor := BibTextRenderer new. | ||
visitor render: p for: entry. | ||
self assert: visitor contents isEmpty |