11/* 
22 * This file is part of mammoth, licensed under the MIT License. 
33 * 
4-  * Copyright (c) 2021-2022  KyoriPowered 
4+  * Copyright (c) 2021-2024  KyoriPowered 
55 * 
66 * Permission is hereby granted, free of charge, to any person obtaining a copy 
77 * of this software and associated documentation files (the "Software"), to deal 
3737import  java .util .regex .Pattern ;
3838import  org .gradle .testkit .runner .BuildResult ;
3939import  org .gradle .testkit .runner .GradleRunner ;
40- import  org .jetbrains .annotations .NotNull ;
4140import  org .junit .jupiter .api .Assertions ;
4241
4342import  static  java .util .Objects .requireNonNull ;
@@ -78,11 +77,11 @@ public final class TestContext {
7877   * @return the output directory 
7978   * @since 1.1.0 
8079   */ 
81-   public  @ NotNull   Path  outputDirectory () {
80+   public  Path  outputDirectory () {
8281    return  this .outputDirectory ;
8382  }
8483
85-   @ NotNull   String  gradleVersion () {
84+   String  gradleVersion () {
8685    return  this .gradleVersion ;
8786  }
8887
@@ -93,7 +92,7 @@ public final class TestContext {
9392   * @throws IOException if an error occurs writing the input file to disk 
9493   * @since 1.1.0 
9594   */ 
96-   public  void  copyInput (final  @ NotNull   String  name ) throws  IOException  {
95+   public  void  copyInput (final  String  name ) throws  IOException  {
9796    this .copyInput (name , name );
9897  }
9998
@@ -105,7 +104,7 @@ public void copyInput(final @NotNull String name) throws IOException {
105104   * @throws IOException if an error occurs writing the input file to disk 
106105   * @since 1.1.0 
107106   */ 
108-   public  void  copyInput (final  @ NotNull   String  fromName , final   @ NotNull  String  toName ) throws  IOException  {
107+   public  void  copyInput (final  String  fromName , final  String  toName ) throws  IOException  {
109108    requireNonNull (fromName , "fromName" );
110109    requireNonNull (toName , "toName" );
111110    try  (final  InputStream  is  = this .resourceBase .getResourceAsStream (this .testName  + "/in/"  + fromName )) {
@@ -130,7 +129,7 @@ public void copyInput(final @NotNull String fromName, final @NotNull String toNa
130129   * @throws IOException if an error occurs writing the text 
131130   * @since 1.2.0 
132131   */ 
133-   public  void  writeText (final  @ NotNull   String  destination , final   @ NotNull  String  text ) throws  IOException  {
132+   public  void  writeText (final  String  destination , final  String  text ) throws  IOException  {
134133    requireNonNull (destination , "destination" );
135134    requireNonNull (text , "text" );
136135
@@ -149,7 +148,7 @@ public void writeText(final @NotNull String destination, final @NotNull String t
149148   * @throws IOException if thrown while attempting to read the output file 
150149   * @since 1.1.0 
151150   */ 
152-   public  @ NotNull   String  readOutput (final   @ NotNull  String  fileName ) throws  IOException  {
151+   public  String  readOutput (final  String  fileName ) throws  IOException  {
153152    final  StringBuilder  builder  = new  StringBuilder ();
154153    try  (final  BufferedReader  reader  = Files .newBufferedReader (this .outputDirectory .resolve (fileName ), StandardCharsets .UTF_8 )) {
155154      final  char [] buffer  = new  char [8192 ];
@@ -169,7 +168,7 @@ public void writeText(final @NotNull String destination, final @NotNull String t
169168   * @throws IOException if an error occurs reading the text 
170169   * @since 1.2.0 
171170   */ 
172-   public  void  assertOutputEqualsLiteral (final  @ NotNull   String  destination , final   @ NotNull  String  text ) throws  IOException  {
171+   public  void  assertOutputEqualsLiteral (final  String  destination , final  String  text ) throws  IOException  {
173172    requireNonNull (destination , "destination" );
174173    requireNonNull (text , "text" );
175174
@@ -188,7 +187,7 @@ public void assertOutputEqualsLiteral(final @NotNull String destination, final @
188187   * @throws IOException if failed to read one of the files 
189188   * @since 1.1.0 
190189   */ 
191-   public  void  assertOutputEquals (final  @ NotNull   String  resourceName , final   @ NotNull  String  fileName ) throws  IOException  {
190+   public  void  assertOutputEquals (final  String  resourceName , final  String  fileName ) throws  IOException  {
192191    final  String  actualOutput  = this .readOutput (fileName );
193192
194193    final  StringBuilder  builder  = new  StringBuilder ();
@@ -215,7 +214,7 @@ public void assertOutputEquals(final @NotNull String resourceName, final @NotNul
215214   * @return the new runner 
216215   * @since 1.1.0 
217216   */ 
218-   public  @ NotNull   GradleRunner  runner (final  @ NotNull   String @ NotNull ... extraArgs ) {
217+   public  GradleRunner  runner (final  String ... extraArgs ) {
219218    final  List <String > args  = new  ArrayList <>(this .commonArguments .size () + extraArgs .length );
220219    args .addAll (this .commonArguments );
221220    Collections .addAll (args , extraArgs );
@@ -234,7 +233,7 @@ public void assertOutputEquals(final @NotNull String resourceName, final @NotNul
234233   * @return the result of an executed build 
235234   * @since 1.1.0 
236235   */ 
237-   public  @ NotNull   BuildResult  build (final  @ NotNull   String @ NotNull ... extraArgs ) {
236+   public  BuildResult  build (final  String ... extraArgs ) {
238237    return  this .runner (extraArgs ).build ();
239238  }
240239
0 commit comments