Пример #1
0
        public void IsMvcAssembly_FailsIfNotMvc()
        {
            // Arrange
            var assemblyFilePath  = new FilePath("C:/Path/To/Assembly.dll");
            var assemblyReference = new AssemblyReference(assemblyFilePath);

            // Act
            var result = FallbackMacRazorProjectHost.IsMvcAssembly(assemblyReference);

            // Assert
            Assert.False(result);
        }
Пример #2
0
        public void IsMvcAssembly_SucceedsIfMvc()
        {
            // Arrange
            var assemblyFilePath  = new FilePath("C:/Path/To/Microsoft.AspNetCore.Mvc.Razor.dll");
            var assemblyReference = new AssemblyReference(assemblyFilePath);

            // Act
            var result = FallbackMacRazorProjectHost.IsMvcAssembly(assemblyReference);

            // Assert
            Assert.True(result);
        }
Пример #3
0
        public void IsMvcAssembly_FailsIfNullOrEmptyFilePath(string filePath)
        {
            // Arrange
            var assemblyFilePath  = new FilePath(filePath);
            var assemblyReference = new AssemblyReference(assemblyFilePath);

            // Act
            var result = FallbackMacRazorProjectHost.IsMvcAssembly(assemblyReference);

            // Assert
            Assert.False(result);
        }