blib/lib/JMAP/Validation/Generators/File.pm untested

filter: Statementstmt 0.0% 0 / 20 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 26 SCAR 6.9
CC
1
Cov
0%
generate
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package JMAP::Validation::Generators::File;
2  
3 use strict;
4 use warnings;
5  
6 use JMAP::Validation::Generators::String;
7 use JSON::Typist;
8  
9 sub generate {
10 my $blobId = 1;
11  
12 my @files;
13  
14 foreach my $type (JMAP::Validation::Generators::String->generate(), undef) {
15 foreach my $name (JMAP::Validation::Generators::String->generate(), undef) {
16 foreach my $size (JSON::Typist::Number->new(int(rand(2**32))), undef) {
17 push @files, {
18 blobId => JMAP::Validation::Generators::String->generate(),
19 type => $type,
20 name => $name,
21 size => $size,
22 };
23  
24 $blobId++;
25 }
26 }
27 }
28  
29 return @files;
30 }
31  
32 1;