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 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); }