public void ShouldConvertCustomIStickerMessageToStickerMessage() { var message = new TestStickerMessage(); var stickerMessage = StickerMessage.Convert(message); Assert.AreNotEqual(message, stickerMessage); Assert.AreEqual("PackageId", stickerMessage.PackageId); Assert.AreEqual("StickerId", stickerMessage.StickerId); }
public void ShouldThrowExceptionWhenStickerIdIsNull() { var message = new StickerMessage() { PackageId = "PackageId" }; ExceptionAssert.Throws <InvalidOperationException>("The sticker id cannot be null.", () => { StickerMessage.Convert(message); }); }
public void ShouldPreserveInstanceWhenValueIsStickerMessage() { var message = new StickerMessage() { PackageId = "PackageId", StickerId = "StickerId" }; var stickerMessage = StickerMessage.Convert(message); Assert.AreSame(message, stickerMessage); }