@@ -164,6 +164,39 @@ public virtual void UnknownPlaceHoldersTest() {
164
164
NUnit . Framework . Assert . AreEqual ( "||" , newProducerLine ) ;
165
165
}
166
166
167
+ [ NUnit . Framework . Test ]
168
+ public virtual void ModifiedUsingEqualsCurrentProducerTest ( ) {
169
+ IList < ConfirmedEventWrapper > events = GetEvents ( "some Author" , 1 , 2 , 3 ) ;
170
+ String newProducerLine = ProducerBuilder . ModifyProducer ( events , "Old producer; modified using some Author"
171
+ ) ;
172
+ NUnit . Framework . Assert . AreEqual ( "Old producer; modified using some Author" , newProducerLine ) ;
173
+ }
174
+
175
+ [ NUnit . Framework . Test ]
176
+ public virtual void PrevModifiedUsingEqualsCurrentProducerTest ( ) {
177
+ IList < ConfirmedEventWrapper > events = GetEvents ( "some Author" , 1 , 2 , 3 ) ;
178
+ String newProducerLine = ProducerBuilder . ModifyProducer ( events , "Old producer; modified using some Author; modified using another tool"
179
+ ) ;
180
+ NUnit . Framework . Assert . AreEqual ( "Old producer; modified using some Author; modified using another tool; "
181
+ + "modified using some Author" , newProducerLine ) ;
182
+ }
183
+
184
+ [ NUnit . Framework . Test ]
185
+ public virtual void SeveralModifiedUsingEqualsCurrentProducerTest ( ) {
186
+ IList < ConfirmedEventWrapper > events = GetEvents ( "some Author" , 1 , 2 , 3 ) ;
187
+ String newProducerLine = ProducerBuilder . ModifyProducer ( events , "Old producer; modified using some Author; modified using some Author"
188
+ ) ;
189
+ NUnit . Framework . Assert . AreEqual ( "Old producer; modified using some Author; modified using some Author" , newProducerLine
190
+ ) ;
191
+ }
192
+
193
+ [ NUnit . Framework . Test ]
194
+ public virtual void OldProducerEqualsCurrentProducerTest ( ) {
195
+ IList < ConfirmedEventWrapper > events = GetEvents ( "some Author" , 1 , 2 , 3 ) ;
196
+ String newProducerLine = ProducerBuilder . ModifyProducer ( events , "some Author" ) ;
197
+ NUnit . Framework . Assert . AreEqual ( "some Author" , newProducerLine ) ;
198
+ }
199
+
167
200
private IList < ConfirmedEventWrapper > GetEvents ( String initialProducerLine , params int [ ] indexes ) {
168
201
IList < ConfirmedEventWrapper > events = new List < ConfirmedEventWrapper > ( ) ;
169
202
for ( int ind = 0 ; ind < indexes . Length ; ind ++ ) {
0 commit comments