"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "subprojects/normalization-java/src/test/groovy/org/gradle/api/internal/changedetection/state/MetaInfAwareClasspathResourceHasherTest.groovy" between
gradle-6.8.2-src.zip and gradle-6.8.3-src.zip

About: Gradle is a build tool with a focus on build automation and support for multi-language development.

MetaInfAwareClasspathResourceHasherTest.groovy  (gradle-6.8.2-src):MetaInfAwareClasspathResourceHasherTest.groovy  (gradle-6.8.3-src)
skipping to change at line 24 skipping to change at line 24
* limitations under the License. * limitations under the License.
*/ */
package org.gradle.api.internal.changedetection.state package org.gradle.api.internal.changedetection.state
import com.google.common.collect.ImmutableSet import com.google.common.collect.ImmutableSet
import org.gradle.api.internal.file.archive.ZipEntry import org.gradle.api.internal.file.archive.ZipEntry
import org.gradle.internal.file.FileMetadata import org.gradle.internal.file.FileMetadata
import org.gradle.internal.file.impl.DefaultFileMetadata import org.gradle.internal.file.impl.DefaultFileMetadata
import org.gradle.internal.hash.HashCode import org.gradle.internal.hash.HashCode
import org.gradle.internal.hash.Hasher
import org.gradle.internal.snapshot.RegularFileSnapshot import org.gradle.internal.snapshot.RegularFileSnapshot
import org.junit.Rule import org.junit.Rule
import org.junit.rules.TemporaryFolder import org.junit.rules.TemporaryFolder
import spock.lang.Specification import spock.lang.Specification
import java.util.function.Supplier import java.util.function.Supplier
import java.util.jar.Attributes import java.util.jar.Attributes
import java.util.jar.Manifest import java.util.jar.Manifest
class MetaInfAwareClasspathResourceHasherTest extends Specification { class MetaInfAwareClasspathResourceHasherTest extends Specification {
skipping to change at line 392 skipping to change at line 393
then: then:
hash1 != hash2 hash1 != hash2
hash1 != hash3 hash1 != hash3
hash2 != hash4 hash2 != hash4
and: and:
hash3 == hash4 hash3 == hash4
} }
def "delegate configuration is added to hasher"() {
def configurationHasher = Mock(Hasher)
def delegate = Mock(ResourceHasher)
useDelegate(delegate)
when:
hasher.appendConfigurationToHasher(configurationHasher)
then:
1 * delegate.appendConfigurationToHasher(configurationHasher)
}
void populateAttributes(Attributes attributes, Map<String, Object> attribute sMap) { void populateAttributes(Attributes attributes, Map<String, Object> attribute sMap) {
attributesMap.each { String name, Object value -> attributesMap.each { String name, Object value ->
if (value instanceof String) { if (value instanceof String) {
attributes.put(new Attributes.Name(name), value) attributes.put(new Attributes.Name(name), value)
} }
} }
} }
def zipEntry(String path, Map<String, Object> attributesMap = [:], Exception exception = null) { def zipEntry(String path, Map<String, Object> attributesMap = [:], Exception exception = null) {
ByteArrayOutputStream bos = getManifestByteStream(attributesMap) ByteArrayOutputStream bos = getManifestByteStream(attributesMap)
 End of changes. 2 change blocks. 
0 lines changed or deleted 13 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)