public void GenerateTableJsonMappingCreateOrAlterCommand_OnEmptyMappingName_ShouldThrowException(string mappingName) { Action act = () => KustoWrapperCommandGenerator .GenerateTableJsonMappingCreateOrAlterCommand(Fixture.SampleKustoTable, mappingName); act.Should().Throw <ArgumentException>(); }
public void GenerateTableCreateCommand_OnSampleKustoTable_ShouldStringCommand() { var command = KustoWrapperCommandGenerator .GenerateTableCreateCommand(Fixture.SampleKustoTable); command.Should().Be(".create table SampleItems (timestamp:datetime)"); }
public void GenerateTableJsonMappingCreateOrAlterCommand_OnNull_ShouldThrowException() { Action act = () => KustoWrapperCommandGenerator .GenerateTableJsonMappingCreateOrAlterCommand(null, "sampleMapping"); act.Should().Throw <ArgumentNullException>(); }
public void GenerateTableJsonMappingCreateOrAlterCommand_OnSampleKustoTable_ShouldReturnCommand() { var command = KustoWrapperCommandGenerator .GenerateTableJsonMappingCreateOrAlterCommand(Fixture.SampleKustoTable, "sampleMapping"); command.Should().Be(".create-or-alter table SampleItems ingestion json mapping 'sampleMapping' '[" + "{\"Properties\":{\"Path\":\"$.Timestamp\"},\"column\":\"timestamp\",\"datatype\":null}" + "]' with (removeOldestIfRequired=False) "); }
public void GenerateTableCreateCommand_OnNull_ShouldThrowException() { Action act = () => KustoWrapperCommandGenerator.GenerateTableCreateCommand(null); act.Should().Throw <ArgumentNullException>(); }