public void SelectCommandBuilder_Throws_When_No_From_Clause_Is_Found() { // Arrange var command = new SelectCommandBuilder(); // Act command.Invoking(x => x.Build()) .Should().Throw <InvalidOperationException>() .And.Message.Should().Be("FROM clause is missing"); }
public void RightOuterJoin_Throws_Exception_When_FromClause_Is_Empty() { // Arrange var command = new SelectCommandBuilder(); // Act command.Invoking(x => x.RightOuterJoin("Table2 ON Table.Id = Table2.FkId")) .Should().Throw <InvalidOperationException>() .WithMessage("No FROM clause found to add RIGHT OUTER JOIN clause to"); }