예제 #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);
        }