Fix README and test for throws on branch not found.
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				Test Workflow / Lint and test library (push) Successful in 1m52s
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	Test Workflow / Lint and test library (push) Successful in 1m52s
				
			This commit is contained in:
		| @@ -27,7 +27,7 @@ dependencies { | |||||||
|  |  | ||||||
| ### Documentation | ### Documentation | ||||||
| Use autocompletion and hover menus in your IDE, or download the | Use autocompletion and hover menus in your IDE, or download the | ||||||
| [generated HTML documentation](https://git.koval.net/cyclane/teamcity-gitea-test-task/releases/download/v0.1.1/tinyvm-0.1.1-javadoc.zip) | generated HTML documentation | ||||||
| from the [latest release](https://git.koval.net/cyclane/teamcity-gitea-test-task/releases). | from the [latest release](https://git.koval.net/cyclane/teamcity-gitea-test-task/releases). | ||||||
|  |  | ||||||
| ## Instructions | ## Instructions | ||||||
|   | |||||||
| @@ -1,5 +1,6 @@ | |||||||
| package tinyvm | package tinyvm | ||||||
|  |  | ||||||
|  | import org.junit.jupiter.api.assertThrows | ||||||
| import java.time.Instant | import java.time.Instant | ||||||
| import kotlin.test.Test | import kotlin.test.Test | ||||||
| import kotlin.test.assertEquals | import kotlin.test.assertEquals | ||||||
| @@ -132,6 +133,13 @@ internal class RepositoryTest { | |||||||
|         assertEquals(10, repository.dumpObjects().size) |         assertEquals(10, repository.dumpObjects().size) | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     @Test | ||||||
|  |     fun `cannot use non-existent branch`() { | ||||||
|  |         assertThrows<BranchNotFoundException> { | ||||||
|  |             repository.useBranch("test-branch") | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  |  | ||||||
|     @Test |     @Test | ||||||
|     fun `can commit to branch`() { |     fun `can commit to branch`() { | ||||||
|         repository.commit(commits[0]) |         repository.commit(commits[0]) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user