public void SourceCodeAndAssemblies_SomeCodeAndStandardAssemblies_Same()
 {
     const string sourceCode = "some source code";
     var factory = new RuntimeLinkedLibraryFactory(sourceCode);
     Assert.That(factory.SourceCode, Is.EqualTo(sourceCode));
     Assert.That(factory.Assemblies, Is.SameAs(RuntimeLinkedLibraryFactory.StandardAssemblies));
 }
 public void SourceCodeAndAssemblies_SomeCodeAndAssemblies_Same()
 {
     const string sourceCode = "some source code";
     var assemblies = new[] {"one", "two"};
     var factory = new RuntimeLinkedLibraryFactory(sourceCode, assemblies);
     Assert.That(factory.SourceCode, Is.EqualTo(sourceCode));
     Assert.That(factory.Assemblies, Is.SameAs(assemblies));
 }
 public void LazyType_StaticClass_DoesNotThrow()
 {
     const string sourceCode = "public static class Any {}";
     var factory = new RuntimeLinkedLibraryFactory(sourceCode);
     Assert.DoesNotThrow(() => { var type = factory.TypeLazy.Value; });
 }
 public void LazyType_NonStaticClass_ThrowExceptionOnEvalLazy()
 {
     const string sourceCode = "public class Any {}";
     var factory = new RuntimeLinkedLibraryFactory(sourceCode);
     var type = factory.TypeLazy.Value;
 }
 public void LazyType_WrongCode_ThrowExceptionOnEvalLazy()
 {
     const string sourceCode = "wrong code";
     var factory = new RuntimeLinkedLibraryFactory(sourceCode);
     var type = factory.TypeLazy.Value;
 }
 public void LazyType_SomeCodeAndtandardAssemblies_NotNull()
 {
     const string sourceCode = "some source code";
     var factory = new RuntimeLinkedLibraryFactory(sourceCode);
     Assert.That(factory.TypeLazy, Is.Not.Null);
 }