public void SingleDeleteWorks() { var deleteWriter = new DeleteWriter(new SqlServerDialect(), MakeConfig()); var post = new Post { PostId = 1 }; var result = deleteWriter.GenerateSql(new[] { post }); Debug.Write(result.Sql); Assert.Equal("delete from [Posts] where [PostId] in (@p_1)", result.Sql); }
public void EmptyDeleteThrows() { var deleteWriter = new DeleteWriter(new SqlServerDialect(), MakeConfig()); Assert.Throws<ArgumentOutOfRangeException>(() => deleteWriter.GenerateSql(new Post[0])); }
public void EmptyDeleteThrows() { var deleteWriter = new DeleteWriter(new SqlServerDialect(), MakeConfig()); Assert.Throws <ArgumentOutOfRangeException>(() => deleteWriter.GenerateSql(new Post[0])); }