public void GetSqlScripts() { // Act var sqlScripts = EventFlowEventStoresMsSql.GetSqlScripts().ToDictionary(s => s.Name, s => s); // Assert sqlScripts.Should().HaveCount(2); sqlScripts.Should().ContainKey("EventStores.Scripts.0001 - Create table EventFlow.sql"); sqlScripts.Should().ContainKey("EventStores.Scripts.0002 - Create eventdatamodel_list_type.sql"); }
public void SqlScriptsAreIdempotent() { // Arrange var sqlScripts = EventFlowEventStoresMsSql.GetSqlScripts().ToList(); // Act foreach (var _ in Enumerable.Range(0, 2)) { foreach (var sqlScript in sqlScripts) { _msSqlDatabase.Execute(sqlScript.Content); } } }