public void WithLocation_WhenLocationIsNotNull_SetsLocationOnNode() { var location = new SourceLocation(0, 0, 1, 2); var sut = new SqlNoop().WithLocation(location); sut.SourceLocation.Should().Be(location); }
public void Validate_WhenNodeNotIsSqlTable_ThrowsException() { var validator = new SqlAstValidator(); var node = new SqlNoop(); Action action = () => validator.Validate(node); action.Should() .Throw <JoinMonsterException>() .Which.Message.Should() .Be($"Expected node to be of type '{typeof(SqlTable)}' but was '{typeof(SqlNoop)}'."); }