#NEWLINE# def test_explicit_and_default_target( self ) : #NEWLINE# #INDENT# default_target = self . make_target ( spec = '//foo:foobar' , target_type = ManagedJarDependencies , artifacts = [ JarDependency ( org = 'foobar' , name = 'foobar' , rev = '2' ) ] ) #NEWLINE# management_target = self . make_target ( spec = '//foo:management' , target_type = ManagedJarDependencies , artifacts = [ JarDependency ( org = 'foobar' , name = 'foobar' , rev = '3' ) ] ) #NEWLINE# jar_library = self . make_target ( spec = '//foo:library' , target_type = JarLibrary , jars = [ JarDependency ( org = 'foobar' , name = 'foobar' ) ] , managed_dependencies = '//foo:management' ) #NEWLINE# context = self . context ( target_roots = [ default_target , management_target , jar_library ] ) #NEWLINE# with self . _subsystem ( default_target = '//foo:management' ) as manager : #NEWLINE# #INDENT# task = self . create_task ( context ) #NEWLINE# task . execute ( ) #NEWLINE# artifact_set = manager . for_target ( self ) #NEWLINE# self . assertFalse ( ( artifact_set is None ) ) #NEWLINE# self . assertEquals ( '3' , artifact_set [ M2Coordinate ( 'foobar' , 'foobar' ) ] . rev )