public void GetCount_Unalias_Throws()
        {
            var configuration = new SqlGeneratorConfiguration();
            var configurator = new SqlGeneratorConfigurator(configuration);

            configurator.Unalias();

            Assert.That(() => configurator.GetCount(), Throws.InvalidOperationException);
        }
        public void MakeDistinct_GetCount_Throws()
        {
            var configuration = new SqlGeneratorConfiguration();
            var configurator = new SqlGeneratorConfigurator(configuration);

            configurator.GetCount();

            Assert.That(() => configurator.MakeDistinct(), Throws.InvalidOperationException);
        }
        public void CountDistinctProperty_SetsCountDistinctProperty()
        {
            var configuration = new SqlGeneratorConfiguration();
            var configurator = new SqlGeneratorConfigurator(configuration);

            configurator.CountDistinctProperty((TestEntityClass e) => e.TestIntegerProperty);

            Assert.That(configuration.DistinctCountPropertyExpression, Is.Not.Null);
        }
        public void Generate_WithExpression_ThrowsException()
        {
            var configuration = new SqlGeneratorConfiguration();

            Assert.That(
                () => Join.Using(_joinConfiguration)
                    .StartWith<LinqToObjectsOne>()
                    .Sql<LinqToObjectsOne>(new SqlGenerator(), configuration),
                Throws.InstanceOf<NotImplementedException>());
        }
        public void GetCount_SetsCountToTrue()
        {
            var configuration = new SqlGeneratorConfiguration();
            var configurator = new SqlGeneratorConfigurator(configuration);

            configurator.GetCount();

            Assert.That(configuration.Count, Is.True);
            Assert.That(configuration.DistinctCountPropertyExpression, Is.Null);
        }
        public void Unalias_StarSelect_Throws()
        {
            var configuration = new SqlGeneratorConfiguration();
            var configurator = new SqlGeneratorConfigurator(configuration);

            configurator.StarSelect();

            Assert.That(() => configurator.Unalias(), Throws.InvalidOperationException);
        }
        public void Unalias_SetsUnaliasToTrue()
        {
            var configuration = new SqlGeneratorConfiguration();
            var configurator = new SqlGeneratorConfigurator(configuration);

            configurator.Unalias();

            Assert.That(configuration.Unalias, Is.True);
            Assert.That(configuration.DistinctCountPropertyExpression, Is.Null);
        }
        public void StarSelect_SetsStarSelectToTrue()
        {
            var configuration = new SqlGeneratorConfiguration();
            var configurator = new SqlGeneratorConfigurator(configuration);

            configurator.StarSelect();

            Assert.That(configuration.StarSelect, Is.True);
            Assert.That(configuration.DistinctCountPropertyExpression, Is.Null);
        }