Exemplo n.º 1
0
        public void GetTextDocument()
        {
            var textDocument = new TextDocument
            {
                Id = "1", Text = "Test1", Name = "Test2", Owner = new ApplicationUser {
                    Id = "1"
                }
            };
            var documentService = new Mock <IDocumentService>();

            documentService
            .Setup(service => service.GetDocument("1"))
            .Returns(textDocument);
            var controller = new DocumentsController(documentService.Object);

            var result = controller.GetTextDocument("1");

            Assert.Equal(textDocument, result);
        }