Exemplo n.º 1
0
        public void Execute_InvalidPath_ThrowExternalDependency()
        {
            var args = new AssemblyQueryResolverArgs(
                @"Acceptance\Resources\NBi.Testing.dll",
                "NBi.Testing.Acceptance.Resources.AssemblyClass",
                "GetTextSelectSql",
                false,
                new Dictionary <string, object>()
            {
                { "prefix", "CY" }
            },
                ConnectionStringReader.GetSqlClient(),
                new List <IQueryParameter>()
            {
                new QueryParameter("param", "10")
            },
                new List <IQueryTemplateVariable>()
            {
                new QueryTemplateVariableXml()
                {
                    Name = "operator", Value = "not in"
                }
            },
                10);

            var resolver = new AssemblyQueryResolver(args);

            Assert.Throws <ExternalDependencyNotFoundException>(() => resolver.Execute());
        }
Exemplo n.º 2
0
        public void Execute_InvalidAbsolutePath_MessageAbsolutePath()
        {
            var args = new AssemblyQueryResolverArgs(
                @"C:\NotExisting.dll",
                "NBi.Testing.Acceptance.Resources.AssemblyClass",
                "GetTextSelectSql",
                false,
                new Dictionary <string, object>()
            {
                { "prefix", "CY" }
            },
                ConnectionStringReader.GetSqlClient(),
                null, null, 10);

            var resolver = new AssemblyQueryResolver(args);
            var ex       = Assert.Catch <ExternalDependencyNotFoundException>(() => resolver.Execute());

            Assert.That(ex.Message, Is.StringContaining(@"C:\NotExisting.dll"));
        }