Beispiel #1
0
        public void SaveMedia_NormalCase_Saved()
        {
            Mock<ILoggerService> loggerService = new Mock<ILoggerService>();
            loggerService.SetupSequence(o => o.Log(It.IsAny<Log>())).Returns(true);

            FileService Service = new FileService(loggerService.Object);
            string path = "/test.txt";
            bool flag = Service.SaveMedia(path, new byte[1]);
            Assert.IsTrue(flag);
        }
Beispiel #2
0
        public void Setup()
        {
            Mock<ILoggerService> loggerService = new Mock<ILoggerService>();
            loggerService.SetupSequence(o => o.Log(It.IsAny<Log>())).Returns(true);

            FileService Service = new FileService(loggerService.Object);
            Service.SaveMedia(StoredMedia, data);
        }