[smuxi] Engine-Tests: track API changes of MessageMode/Builder



commit 515ed238f78aeca83ddd9f80128756b90e830fdd
Author: Mirco Bauer <meebey meebey net>
Date:   Sun Feb 23 12:40:16 2014 +0100

    Engine-Tests: track API changes of MessageMode/Builder

 src/Engine-Tests/MessageDtoModelV1Tests.cs |    7 +++----
 src/Engine-Tests/MessageModelTests.cs      |    7 +++----
 2 files changed, 6 insertions(+), 8 deletions(-)
---
diff --git a/src/Engine-Tests/MessageDtoModelV1Tests.cs b/src/Engine-Tests/MessageDtoModelV1Tests.cs
index e00ee27..5bf598d 100644
--- a/src/Engine-Tests/MessageDtoModelV1Tests.cs
+++ b/src/Engine-Tests/MessageDtoModelV1Tests.cs
@@ -49,10 +49,9 @@ namespace Smuxi.Engine
             SimpleMessageDtoV1 = JsonSerializer.DeserializeFromString<MessageDtoModelV1>(SimpleMessageJson);
 
             var topic = "Smuxi the IRC client for sophisticated users: http://smuxi.org/ | Smuxi 0.7.2.2 
'Lovegood' released (2010-07-27) http://bit.ly/9nvsZF | FAQ: http://smuxi.org/faq/ | Deutsch? -> #smuxi.de | 
Español? -> #smuxi.es | Smuxi @ FOSDEM 2010 talk: http://bit.ly/anHJfm";;
-            var msg = new MessageModel(topic);
-            MessageParser.ParseUrls(msg);
-            msg.Compact();
-            ComplexMessage = msg;
+            builder = new MessageBuilder();
+            builder.AppendMessage(topic);
+            ComplexMessage = builder.ToMessage();
             ComplexMessageJson = JsonSerializer.SerializeToString(ComplexMessage);
             ComplexMessageDtoV1 = 
JsonSerializer.DeserializeFromString<MessageDtoModelV1>(ComplexMessageJson);
         }
diff --git a/src/Engine-Tests/MessageModelTests.cs b/src/Engine-Tests/MessageModelTests.cs
index 31abc9e..f69e35d 100644
--- a/src/Engine-Tests/MessageModelTests.cs
+++ b/src/Engine-Tests/MessageModelTests.cs
@@ -44,10 +44,9 @@ namespace Smuxi.Engine
             SimpleMessage = builder.ToMessage();
 
             var topic = "Smuxi the IRC client for sophisticated users: http://smuxi.org/ | Smuxi 0.7.2.2 
'Lovegood' released (2010-07-27) http://bit.ly/9nvsZF | FAQ: http://smuxi.org/faq/ | Deutsch? -> #smuxi.de | 
Español? -> #smuxi.es | Smuxi @ FOSDEM 2010 talk: http://bit.ly/anHJfm";;
-            var msg = new MessageModel(topic);
-            MessageParser.ParseUrls(msg);
-            msg.Compact();
-            ComplexMessage = msg;
+            builder = new MessageBuilder();
+            builder.AppendMessage(topic);
+            ComplexMessage = builder.ToMessage();
         }
 
         [Test]


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]