public void GetCompilationOptions_ReturnsDefaultOptionsIfApplicationNameIsNullOrEmpty(string name)
        {
            // Arrange
            var hostingEnvironment = Mock.Of <IHostingEnvironment>(e => e.ApplicationName == name);
            var compiler           = new CSharpCompiler(ReferenceManager, hostingEnvironment);

            // Act
            var options = compiler.GetDependencyContextCompilationOptions();

            // Assert
            Assert.Same(DependencyContextCompilationOptions.Default, options);
        }
        public void GetCompilationOptions_ReturnsDefaultOptionsIfApplicationDoesNotHaveDependencyContext()
        {
            // Arrange
            var hostingEnvironment = new Mock <IHostingEnvironment>();

            hostingEnvironment.SetupGet(e => e.ApplicationName)
            .Returns(typeof(Controller).GetTypeInfo().Assembly.GetName().Name);
            var compiler = new CSharpCompiler(ReferenceManager, hostingEnvironment.Object);

            // Act
            var options = compiler.GetDependencyContextCompilationOptions();

            // Assert
            Assert.Same(DependencyContextCompilationOptions.Default, options);
        }