Exemplo n.º 1
0
        public void assert_is_valid_with_application_base_and_environment_class_name_but_not_assembly()
        {
            var run = new EnvironmentRun()
            {
                ApplicationBase      = ".",
                EnvironmentClassName = "some class"
            };

            run.AssertIsValid();
        }
Exemplo n.º 2
0
        public void assert_is_valid_with_application_base_and_assembly_name_set_should_not_throw()
        {
            var run = new EnvironmentRun()
            {
                ApplicationBase = ".",
                AssemblyName    = "SomeAssembly"
            };

            run.AssertIsValid();
        }
Exemplo n.º 3
0
        public void assert_is_valid_missing_application_base_throws()
        {
            var run = new EnvironmentRun {
                EnvironmentClassName = "some class"
            };

            Exception <EnvironmentRunnerException> .ShouldBeThrownBy(() =>
            {
                run.AssertIsValid();
            }).Message.ShouldContain("ApplicationBase must be a valid folder");
        }
Exemplo n.º 4
0
        public void assert_is_valid_missing_both_environment_class_name_and_assembly_name_throws()
        {
            var run = new EnvironmentRun()
            {
                ApplicationBase = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "folder1")
            };

            Exception <EnvironmentRunnerException> .ShouldBeThrownBy(() =>
            {
                run.AssertIsValid();
            }).Message.ShouldContain("Either EnvironmentClassName or AssemblyName must be set");
        }