Example #1
0
        public void FallsBackToNamespaceForTypeSettings()
        {
            var reader = new ConfigurationFileCommandReader();
            var result = reader.GetCommand(typeof(TypeA), "FallsBackToNamespace");

            NotNull(result);
            Equal("select 'TypeA';", result.CommandText);
        }
Example #2
0
        public void Successfully()
        {
            var reader = new ConfigurationFileCommandReader();
            var result = reader.GetCommand(typeof(GetCommand), "ExplicitKey");

            // assert values
            Equal("select @Id [Result]", result.CommandText);
            Equal("TestId", result.Split);
            Equal(IsolationLevel.ReadCommitted, result.IsolationLevel);

            NotNull(result);
        }
Example #3
0
 public void UnknownKeyThrowsArgumentNullException()
 {
     var reader = new ConfigurationFileCommandReader();
     var result = Throws <ArgumentNullException>(() => reader.GetCommand(typeof(GetCommand), "Unknown"));
 }
Example #4
0
 public void NullKeyArgumentThrowsArgumentNullException()
 {
     var reader = new ConfigurationFileCommandReader();
     var result = Throws <ArgumentNullException>(() => reader.GetCommand(typeof(GetCommand), null));
 }
Example #5
0
 public void UnknownTypeThrowsArgumentNullException()
 {
     var reader = new ConfigurationFileCommandReader();
     var result = Throws <ArgumentNullException>(() => reader.GetCommand(typeof(ConfigurationFileCommandReader), "ExplicitKey"));
 }
Example #6
0
 public void NullTypeArgumentThrowsArgumentNullException()
 {
     var reader = new ConfigurationFileCommandReader();
     var result = Throws <ArgumentNullException>(() => reader.GetCommand(null, "ExplicitKey"));
 }