Ejemplo n.º 1
0
        public void AddFileContentMockVerify()
        {
            Mock <IDBManager> databaseMock = new Mock <IDBManager>();

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

            fileContentController = new FileContentController(databaseMock.Object);

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

            databaseMock.Verify(database => database.AddFileContent(fileContent), Times.Once);
        }
 public void AddToDatabase(Files file, FileContent fileContent, IFileController fc, IFileContentController fcc)
 {
     fc.Add(file);
     fcc.Add(fileContent);
 }