Esempio n. 1
0
        public void Class_Implements_Interface()
        {
            var obj = new DummyReviewsDatastoreBase(_dbConnectionFactory.Object, _logger.Object, _policy.Object);

            var implInt = obj as IReviewsDatastore <ReviewsBase>;

            implInt.Should().NotBeNull();
        }
Esempio n. 2
0
        public void GetSqlCurrent_ContainsAllPublicProperties()
        {
            const string TableName = "Reviews";

            var props     = typeof(ReviewsBase).GetProperties(BindingFlags.Public | BindingFlags.Instance);
            var datastore = new DummyReviewsDatastoreBase(_dbConnectionFactory.Object, _logger.Object, _policy.Object);

            var sqlCurrent = datastore.GetSqlCurrent(TableName);


            foreach (var prop in props)
            {
                sqlCurrent.Should().Contain($"{TableName}.{prop.Name}");
            }
        }