src/Cassandra.IntegrationTests/Linq/LinqTable/CreateTable.cs
/// <summary>
/// Attempt to create the same table using the method Create twice, validate expected failure message
/// </summary>
Attempt to create the same table using the method Create twice, validate expected failure message
Attempt to create the same table using the method Create twice validate expected failure message
[Test, TestCassandraVersion(2, 0)]
        public void TableCreate_CreateTable_AlreadyExists()
        {
            var config = new MappingConfiguration().Define(new Map<AllDataTypesEntity>().TableName("tbl_already_exists_1").PartitionKey(a => a.TimeUuidType));
            var table = new Table<AllDataTypesEntity>(_session, config);
            table.Create();
            Assert.Throws<AlreadyExistsException>(() => table.Create());
        }
[ Test , TestCassandraVersion ( 2 , 0 ) ] public void TableCreate_CreateTable_AlreadyExists ( ) { var config = new MappingConfiguration ( ) . Define ( new Map < AllDataTypesEntity > ( ) . TableName ( " " ) . PartitionKey ( a => a . TimeUuidType ) ) ; var table = new Table < AllDataTypesEntity > ( _session , config ) ; table . Create ( ) ; Assert . Throws < AlreadyExistsException > ( ( ) => table . Create ( ) ) ; }
Attempt to create the same table using the method Create twice, validate expected failure message
Attempt to create the same table using the method Create twice validate expected failure message