// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'package:analysis_server/src/services/correction/assist.dart';
import 'package:analyzer_plugin/utilities/assist/assist.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';

import 'assist_processor.dart';

main() {
  defineReflectiveSuite(() {
    defineReflectiveTests(SurroundWithBlockTest);
  });
}

@reflectiveTest
class SurroundWithBlockTest extends AssistProcessorTest {
  @override
  AssistKind get kind => DartAssistKind.SURROUND_WITH_BLOCK;

  test_notStatementInBlock() async {
    await resolveTestUnit('''
main() {
  while (true)
// start
    print(0);
// end
}
''');
    await assertNoAssist();
  }

  test_twoStatements() async {
    await resolveTestUnit('''
main() {
// start
  print(0);
  print(1);
// end
}
''');
    await assertHasAssist('''
main() {
  {
    print(0);
    print(1);
  }
}
''');
  }
}
