예제 #1
0
        public void ArgumentsCreateReferenceWithNullDirectory_Faillingtest()
        {
            Arguments arguments;

            ArgumentException ex = Assert.Throws <ArgumentException>(() => arguments = new Arguments(_SCHEMA, _args, null));

            Assert.Equal("Directory must not be null", ex.ErrorMessage());
        }
        public void MarshalerReflectorCreateReferenceWithNullDirectory_FaillingTest()
        {
            MarshalerReflector reflector;

            ArgumentException ex = Assert.Throws <ArgumentException>(() => reflector = new MarshalerReflector(null));

            Assert.Equal("Directory does not exist! ()", ex.ErrorMessage());
        }
예제 #3
0
        public void ArgumentsCreateReferenceWithNullArgs_FaillingTest()
        {
            Arguments arguments;

            ArgumentException ex = Assert.Throws <ArgumentException>(() => arguments = new Arguments(_SCHEMA, null, _DIRECTORY));

            Assert.Equal("There are no given arguments!", ex.ErrorMessage());
        }
예제 #4
0
        public void ArgumentsCreateReferenceWithEmptyDirectory_Faillingtest()
        {
            Arguments arguments;

            ArgumentException ex = Assert.Throws <ArgumentException>(() => arguments = new Arguments(_SCHEMA, _args, string.Empty));

            Assert.Equal("Directory does not exist! ()", ex.ErrorMessage());
        }
예제 #5
0
        public void ArgumentsCreateReferenceWithNullSchema_FailingTest()
        {
            Arguments arguments;

            ArgumentException ex = Assert.Throws <ArgumentException>(() => arguments = new Arguments(null, _args, _DIRECTORY));

            Assert.Equal("Schema must not be null or whitespace only!", ex.ErrorMessage());
        }
예제 #6
0
        public void ArgumentsGetValueWithWrongDatatype_FailingTest()
        {
            Arguments arguments = new Arguments(_SCHEMA, _args, _DIRECTORY);

            ArgumentException ex = Assert.Throws <ArgumentException>(() => arguments.GetValue <double>("logging"));

            Assert.Equal("There is no value with given Type for given Argument!", ex.ErrorMessage());
        }
예제 #7
0
        public void ArgumentsGetValueWithNotExistingKey_FailingTest()
        {
            Arguments arguments = new Arguments(_SCHEMA, _args, _DIRECTORY);

            ArgumentException ex = Assert.Throws <ArgumentException>(() => arguments.GetValue <string>("hallo"));

            Assert.Equal("'-hallo' is not valid!", ex.ErrorMessage());
        }
예제 #8
0
        public void ArgumentsGetValueWithNullArgument_FailingTest()
        {
            Arguments arguments = new Arguments(_SCHEMA, _args, _DIRECTORY);

            ArgumentException ex = Assert.Throws <ArgumentException>(() => arguments.GetValue <string>(null));

            Assert.Equal("Argument must not be null!", ex.ErrorMessage());
        }
예제 #9
0
        public void ArgumentsGetValueWithEmptyArgument_FailingTest()
        {
            Arguments arguments = new Arguments(_SCHEMA, _args, _DIRECTORY);

            ArgumentException ex = Assert.Throws <ArgumentException>(() => arguments.GetValue <string>(string.Empty));

            Assert.Equal("'-' is not valid!", ex.ErrorMessage());
        }
        public void MarshalerReflectorCreateReferenceWithoutAssembliesInPath_FaillingTest()
        {
            MarshalerReflector reflector;
            string             directory = @"../";

            ArgumentException ex = Assert.Throws <ArgumentException>(() => reflector = new MarshalerReflector(directory));

            Assert.Equal("Couldn't find any assembly!", ex.ErrorMessage());
        }
        public void MarshalerReflectorCreateReferenceWithNotExistingDirectory_FaillingTest()
        {
            MarshalerReflector reflector;
            string             directory = @"./HalloBlaBla";

            ArgumentException ex = Assert.Throws <ArgumentException>(() => reflector = new MarshalerReflector(directory));

            Assert.Equal($"Directory does not exist! ({directory})", ex.ErrorMessage());
        }
        public void MarshalerReflectorGetInstanceBySchemaWithNull_FailingTest()
        {
            ArgumentException ex = Assert.Throws <ArgumentException>(() => _reflector.GetInstanceBySchema(null));

            Assert.Equal("Schema must not be null!", ex.ErrorMessage());
        }