예제 #1
0
        public void ShouldReturnMoreThanZeroConnections()
        {
            var dbFileManager = new DbFileManager(dbPath);
            var scriptContainer = dbFileManager.GetScripts();

            scriptContainer.Connections.Count().Should().BeGreaterThan(0);
        }
예제 #2
0
 public void EachConnectionShouldReturnMoreThanZeroObjectTypes()
 {
     var dbFileManager = new DbFileManager(dbPath);
     var scriptContainer = dbFileManager.GetScripts();
     foreach (var connection in scriptContainer.Connections)
     {
         connection.ObjectTypes.Count().Should().BeGreaterThan(0);
     }
 }
예제 #3
0
 public void ShouldReturnConnectionsInAnOrderedWay()
 {
     var dbFileManager = new DbFileManager(dbPath);
     var scriptContainer = dbFileManager.GetScripts();
     int order = int.MinValue;
     foreach (var connection in scriptContainer.Connections)
     {
         order.Should().BeLessOrEqualTo(connection.Order);
         order = connection.Order;
     }
 }
예제 #4
0
        public void ShouldReturnScriptsInAnOrderedWay()
        {
            var dbFileManager = new DbFileManager(dbPath);
            var scriptContainer = dbFileManager.GetScripts();

            foreach (var connection in scriptContainer.Connections)
            {

                foreach (var objectType in connection.ObjectTypes)
                {
                    int order = int.MinValue;
                    foreach (var script in objectType.Scripts)
                    {
                        order.Should().BeLessOrEqualTo(script.Order);
                        order = script.Order;
                    }
                }

            }
        }