public void DeserializationMultipleMessageEntrepriseApplication()
        {
            Message message = new Message(0, 1, "Serialization - Message dans le bon format", "21/03/2015");
            User    user    = new User("Vincent", "Couvignou", "*****@*****.**", "19/03/2015", "masculin", true, null, null, null);
            DataContractJsonSerializer jsMessage = new DataContractJsonSerializer(typeof(Message));
            DataContractJsonSerializer jsUser    = new DataContractJsonSerializer(typeof(User));
            MemoryStream m = new MemoryStream();

            jsUser.WriteObject(m, user);
            jsMessage.WriteObject(m, message);

            m.Position = 0;
            StreamReader  s        = new StreamReader(m, Encoding.UTF8);
            List <string> listJson = ParseStream.ParseStreamToString(s);

            Assert.IsTrue(listJson.Count == 2);

            Message me = null;
            User    u  = null;

            foreach (var jsonItem in listJson)
            {
                StreamReader itemStream = new StreamReader(ParseStream.GenerateStreamFromString(jsonItem), Encoding.UTF8);
                var          userObject = JsonValue.Load(itemStream) as JsonObject;
                Assert.IsNotNull(userObject);
                MemoryStream mItem = new MemoryStream(Encoding.ASCII.GetBytes(jsonItem));
                if ((int)userObject["message_type"] == (int)MessageType.USER_INFORMATION)
                {
                    u = jsUser.ReadObject(mItem) as User;
                    Assert.IsTrue(true);
                }
                else if ((int)userObject["message_type"] == (int)MessageType.MESSAGE)
                {
                    me = jsMessage.ReadObject(mItem) as Message;
                    Assert.IsTrue(true);
                }
                else
                {
                    Assert.IsTrue(false);
                }
            }

            Assert.IsNotNull(u);
            Assert.IsNotNull(me);
            Assert.IsTrue(me.Equals(message));
            Assert.IsTrue(u.Equals(user) && me.Equals(message));
        }