Esempio n. 1
0
        public void ToTransfertObject_ProvidingNull_ThrowException()
        {
            //ARRANGE
            MediaEF media = null;

            //ACT
            Assert.ThrowsException <ArgumentNullException>(() => media.ToTransferObject());
        }
Esempio n. 2
0
        public void ToTransfertObject_Successfull()
        {
            //ARRANGE
            var media = new MediaEF {
                Id = 1, Name = "Cendrillon", Type = MediaType.Film, Path = "C:/Films/Animation"
            };
            //ACT
            var result = media.ToTransferObject();

            //Assert
            Assert.AreEqual(media.Name, result.Name);
            Assert.AreEqual(media.Id, result.Id);
            Assert.AreEqual(media.Type, result.Type);
            Assert.AreEqual(media.Path, result.Path);
        }