"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/IgnoringResourceHasherTest.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.

IgnoringResourceHasherTest.groovy  (gradle-6.8.2-src):IgnoringResourceHasherTest.groovy  (gradle-6.8.3-src)
skipping to change at line 22 skipping to change at line 22
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.gradle.api.internal.changedetection.state package org.gradle.api.internal.changedetection.state
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 spock.lang.Specification import spock.lang.Specification
class IgnoringResourceHasherTest extends Specification { class IgnoringResourceHasherTest extends Specification {
def delegate = Mock(ResourceHasher) def delegate = Mock(ResourceHasher)
def resourceFilter = Mock(ResourceFilter) def resourceFilter = Mock(ResourceFilter)
def hasher = new IgnoringResourceHasher(delegate, resourceFilter) def hasher = new IgnoringResourceHasher(delegate, resourceFilter)
def snapshot = new RegularFileSnapshot("path", "path", HashCode.fromInt(456) , DefaultFileMetadata.file(3456, 456, FileMetadata.AccessType.DIRECT)) def snapshot = new RegularFileSnapshot("path", "path", HashCode.fromInt(456) , DefaultFileMetadata.file(3456, 456, FileMetadata.AccessType.DIRECT))
def snapshotContext = new DefaultRegularFileSnapshotContext({path.split('/') }, snapshot) def snapshotContext = new DefaultRegularFileSnapshotContext({path.split('/') }, snapshot)
skipping to change at line 52 skipping to change at line 53
when: when:
def hash = hasher.hash(snapshotContext) def hash = hasher.hash(snapshotContext)
then: then:
1 * resourceFilter.shouldBeIgnored(_) >> true 1 * resourceFilter.shouldBeIgnored(_) >> true
0 * delegate.hash(_) 0 * delegate.hash(_)
and: and:
hash == null hash == null
} }
def "delegate configuration is added to hasher"() {
def configurationHasher = Mock(Hasher)
when:
hasher.appendConfigurationToHasher(configurationHasher)
then:
1 * delegate.appendConfigurationToHasher(configurationHasher)
}
} }
 End of changes. 2 change blocks. 
0 lines changed or deleted 11 lines changed or added

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