1+ Feature : Use Version Giving Only The Major Version Number 
2+ 
3+ 	Background :
4+ 		Given  the internet is reachable
5+ 		And  an initialised environment
6+ 
7+ 	Scenario : Use a grails version that is installed giving only major version 
8+ 		Given  the candidate "grails"  version "1.3.0"  is already installed and default
9+ 		And  the candidate "grails"  version "2.1.0"  is already installed but not default
10+ 		And  the system is bootstrapped
11+ 		When  I enter "sdk use grails 2" 
12+ 		Then  I see "Using grails version 2.1.0 in this shell." 
13+ 		Then  the candidate "grails"  version "2.1.0"  should be in use
14+ 
15+ 	Scenario : Use a java version that is installed giving only major version 
16+ 		Given  the candidate "java"  version "21.0.3-blah"  is already installed and default
17+ 		And  the candidate "java"  version "17.0.11-graal"  is already installed but not default
18+ 		And  the system is bootstrapped
19+ 		When  I enter "sdk use java 17" 
20+ 		Then  I see "Using java version 17.0.11-graal in this shell." 
21+ 		Then  the candidate "java"  version "17.0.11-graal"  should be in use
22+ 
23+ 	Scenario : Fail to use a major version because there are multiple matching versions 
24+ 		Given  the candidate "grails"  version "1.3.0"  is already installed and default
25+ 		And  the candidate "grails"  version "2.1.0"  is already installed but not default
26+ 		And  the candidate "grails"  version "2.3.0"  is already installed but not default
27+ 		And  the system is bootstrapped
28+ 		When  I enter "sdk use grails 2" 
29+ 		Then  I see "Stop! Cannot decide which version to use." 
30+ 
31+ 	Scenario : Fail to use a major version because there is no matching version 
32+ 		Given  the candidate "grails"  version "1.3.0"  is already installed and default
33+ 		And  the system is bootstrapped
34+ 		When  I enter "sdk use grails 2" 
35+ 		Then  I see "Stop! No matching version found." 
36+ 		
0 commit comments