Beispiel #1
0
 public void EntityPersistenceTestFixtureBaseSetup()
 {
     try
     {
         var instance = new LocalDbInstanceEnumerator().FindFirstAvailableInstance();
         Expect(instance).Not.To.Be.Null();
     }
     catch (UnableToFindLocalDbUtilityException)
     {
         Assert.Ignore("LocalDb not found on this machine");
     }
 }
Beispiel #2
0
        public void InstanceFinder_ShouldFindNewInstanceName()
        {
            //---------------Set up test pack-------------------
            var sut = new LocalDbInstanceEnumerator();

            //---------------Assert Precondition----------------

            //---------------Execute Test ----------------------
            var result = sut.FindInstances();

            //---------------Test Result -----------------------
            Expect(result).Not.To.Contain("MSSQLLocalDB");
        }
        public void OnetimeSetup()
        {
            var enumerator = new LocalDbInstanceEnumerator();

            try
            {
                enumerator.FindFirstAvailableInstance();
            }
            catch
            {
                Assert.Ignore("Unable to start localdb");
            }
        }
Beispiel #4
0
        public void InstanceFinder()
        {
            //---------------Set up test pack-------------------
            var sut = new LocalDbInstanceEnumerator();

            //---------------Assert Precondition----------------

            //---------------Execute Test ----------------------
            var result = sut.FindInstances();

            //---------------Test Result -----------------------
            Console.WriteLine(string.Join("\n", result));
            CollectionAssert.IsNotEmpty(result, "If this utility can't find a v-instance of localdb, other tests are going to cry");
        }