Exemplo n.º 1
0
        public static void MessageInfoStickerTest()
        {
            const string fileId   = "100";
            const int    width    = 100;
            const int    height   = 100;
            const string emoji    = "emoji";
            const int    fileSize = 10;

            dynamic MessageInfoSticker = mMandatoryFieldsMessageInfo;

            MessageInfoSticker.sticker = StickerInfoObject.GetObject(fileId, width, height,
                                                                     PhotoSizeInfoObject.GetObject(fileId, width, height, fileSize), emoji, fileSize);

            MessageInfo messageInfo = new MessageInfo(MessageInfoSticker);

            //test MessageInfo.Sticker
            Assert.AreEqual(messageInfo.Sticker.FileId, fileId);
            Assert.AreEqual(messageInfo.Sticker.Width, width);
            Assert.AreEqual(messageInfo.Sticker.Height, height);
            Assert.AreEqual(messageInfo.Sticker.Emoji, emoji);
            Assert.AreEqual(messageInfo.Sticker.FileSize, fileSize);

            //test MessageInfo.Sticker.Thumb
            Assert.AreEqual(messageInfo.Sticker.Thumb.FileId, fileId);
            Assert.AreEqual(messageInfo.Sticker.Thumb.Width, width);
            Assert.AreEqual(messageInfo.Sticker.Thumb.Height, height);
            Assert.AreEqual(messageInfo.Sticker.Thumb.FileSize, fileSize);

            Console.WriteLine(MessageInfoSticker);
        }
Exemplo n.º 2
0
        public static void MessageInfoStickerTest()
        {
            const string fileId   = "100";
            const int    width    = 100;
            const int    height   = 100;
            const string emoji    = "emoji";
            const int    fileSize = 10;

            dynamic messageInfoSticker = MCommonMandatoryFieldsMessageInfo;

            messageInfoSticker.sticker = StickerInfoObject.GetObject(fileId, width, height,
                                                                     MCommonPhotoSizeInfo, emoji, fileSize);

            MessageInfo messageInfo = new MessageInfo(messageInfoSticker);

            Assert.Multiple(() =>
            {
                //test MessageInfo.Sticker
                Assert.AreEqual(fileId, messageInfo.Sticker.FileId);
                Assert.AreEqual(width, messageInfo.Sticker.Width);
                Assert.AreEqual(height, messageInfo.Sticker.Height);
                Assert.AreEqual(emoji, messageInfo.Sticker.Emoji);
                Assert.AreEqual(fileSize, messageInfo.Sticker.FileSize);
            });

            //test MessageInfo.Sticker.Thumb
            AssertPhotoSizeInfo(messageInfo.Sticker.Thumb);
        }