Exemplo n.º 1
0
 public void Init()
 {
     if (!SimpleLookups.IsInitialized)
     {
         SimpleLookups.Initialize(ConnectionStrings.Default);
         SimpleLookups.AddConnectionString("Other", ConnectionStrings.Other);
     }
 }
Exemplo n.º 2
0
 public void Init()
 {
     if (!SimpleLookups.IsInitialized)
     {
         SimpleLookups.Initialize(ConnectionStrings.Default, "Id4", "Name4", "Description4", "Code4", "Active4", false, true, 1800);
         SimpleLookups.AddConnectionString("Other", ConnectionStrings.Other);
     }
 }
Exemplo n.º 3
0
        public void SimpleLookups_AddConnectionString_ProvideEmptyConnectionString_ThrowsArgumentException()
        {
            SimpleLookups.AddConnectionString("TestConnString", "");

            Assert.Fail();
        }
Exemplo n.º 4
0
        public void SimpleLookups_AddConnectionString_ProvideWhitespaceConnectionName_ThrowsArgumentException()
        {
            SimpleLookups.AddConnectionString("      ", "this is a test");

            Assert.Fail();
        }
Exemplo n.º 5
0
        public void SimpleLookups_Initialize_ProvideWhitespaceConnectionString_ThrowsInvalidOperationException()
        {
            SimpleLookups.Initialize("         ");

            Assert.Fail();
        }
Exemplo n.º 6
0
        public void SimpleLookups_Initialize_ProvideNullConnectionString_ThrowsInvalidOperationException()
        {
            SimpleLookups.Initialize(null);

            Assert.Fail();
        }
Exemplo n.º 7
0
        public void SimpleLookups_Initialize_AlreadyInitializedTryToInitializeAgain_ThrowsInvalidOperationException()
        {
            SimpleLookups.Initialize(ConnectionStrings.Default);

            Assert.Fail();
        }