Esempio n. 1
0
        private IMT_Constraints BuildConstraintsTable()
        {
            ILoggerManager            loggerManager    = Substitute.For <ILoggerManager>();
            IDbConnection             connection       = Substitute.For <IDbConnection>();
            FakeConstraintsRepository repository       = new FakeConstraintsRepository(connection);
            IMT_Constraints           constraintsTable = new IMT_Constraints(loggerManager, repository);

            return(constraintsTable);
        }
Esempio n. 2
0
        public void ThrowAnException_WhenConstraintIdNotFoundInDatabase()
        {
            IMT_Constraints constraintsTable = BuildConstraintsTable();

            constraintsTable.LoadData();

            Action codeToTest = () => constraintsTable.GetConstraints(-888);

            Assert.Throws <InvalidOperationException>(codeToTest);
        }
Esempio n. 3
0
        public void ReturnList_WhenConstraintIdNotFoundInDatabase()
        {
            IMT_Constraints constraintsTable = BuildConstraintsTable();

            constraintsTable.LoadData();

            var constraintsList = constraintsTable.GetConstraints(60101);

            Assert.NotEmpty(constraintsList);
        }