示例#1
0
        public void ShouldConvertDocumentToFileNameIfNoSolutionIsOpen()
        {
            var documentMock = new Mock <Document>();

            documentMock.Setup(doc => doc.Language).Returns("CSharp");
            documentMock.Setup(doc => doc.FullName)
            .Returns(@"C:\Users\Sven Amann\Documents\External\Reference\GoldenHammer.cs");
            documentMock.Setup(doc => doc.DTE).Returns(MockDTE.Create());

            var documentName = documentMock.Object.GetName();

            NameAssert.AreEqual(@"CSharp GoldenHammer.cs", documentName);
        }