public void UpdateFileContent(IFileContentController fcc, FileContent fc, string fileId)
        {
            string fileContentId = fcc.GetFileContentId(fileId);

            fc.Id = fileContentId;
            fcc.UpdateFileContent(fc);
        }
Ejemplo n.º 2
0
        public void UpdateFileContentMockVerify()
        {
            Mock <IDBManager> databaseMock = new Mock <IDBManager>();

            databaseMock.Setup(database => database.UpdateFileContent(fileContent)).Verifiable();

            fileContentController = new FileContentController(databaseMock.Object);

            fileContent.FileId  = "nesto";
            fileContent.Content = "nesto2";
            fileContent.Id      = "1,";
            fileContentController.UpdateFileContent(fileContent);

            databaseMock.Verify(database => database.UpdateFileContent(fileContent), Times.Once);
        }