コード例 #1
0
        private string GetSendJson(ObservableQueue <ActivityMessage> pendingData)
        {
            var messageMapper  = new MessageMapper(encryptor);
            var messages       = messageMapper.MapCollection(pendingData.ToList());
            var jsonSerializer = new JsonSerializer();

            return(jsonSerializer.Serialize(messages));
        }
コード例 #2
0
        public void CanMapCollectionOfBjects()
        {
            //Arange
            var list = new List <ActivityMessage>();
            //Act
            var dtoArray = messageMapper.MapCollection(list);

            //Assert
            Assert.That(dtoArray, Is.Not.Null);
        }