@@ -30,13 +30,13 @@ case class GenericCase[T](thing: T) extends GenericUnion[T]
30
30
class GenRefTest extends AnyFunSuite {
31
31
test(" simple raw ref" ) {
32
32
val path = RawRef .create[TransparentToplevel ].ref(_.toplevel.middle.get.bottom.mapa(" str" )).normalize.toList
33
- assert(path == List (" middle" , " bot" , " mapa" , " str" ).map(RawRef .Field ))
33
+ assert(path == List (" middle" , " bot" , " mapa" , " str" ).map(RawRef .Field .apply ))
34
34
}
35
35
36
36
test(" transparent wrapper field ref" ) {
37
37
val path1 = RawRef .create[Toplevel ].ref(_.middle.get.bottom.wrappy).normalize.toList
38
38
val path2 = RawRef .create[Toplevel ].ref(_.middle.get.bottom.wrappy.value).normalize.toList
39
- assert(path1 == List (" middle" , " bot" , " wrappy" ).map(RawRef .Field ))
39
+ assert(path1 == List (" middle" , " bot" , " wrappy" ).map(RawRef .Field .apply ))
40
40
assert(path2 == path1)
41
41
}
42
42
@@ -52,13 +52,13 @@ class GenRefTest extends AnyFunSuite {
52
52
val ref2 = subRef andThen GenRef .create[Middle ].ref(_.bottom.mapa(" str" ))
53
53
val obj = TransparentToplevel (Toplevel (Middle (Bottom (Map (" str" -> 42 ), Wrappy (" oof" ))).opt))
54
54
assert(ref1(obj) == 42 )
55
- assert(ref1.rawRef.normalize.toList == List (" middle" , " bot" , " mapa" , " str" ).map(RawRef .Field ))
55
+ assert(ref1.rawRef.normalize.toList == List (" middle" , " bot" , " mapa" , " str" ).map(RawRef .Field .apply ))
56
56
assert(ref2(obj) == 42 )
57
- assert(ref2.rawRef.normalize.toList == List (" middle" , " bot" , " mapa" , " str" ).map(RawRef .Field ))
57
+ assert(ref2.rawRef.normalize.toList == List (" middle" , " bot" , " mapa" , " str" ).map(RawRef .Field .apply ))
58
58
}
59
59
60
60
test(" gen ref implicits test" ) {
61
- import GenRef .Implicits ._
61
+ import GenRef .Implicits .*
62
62
63
63
val codecRef = CodecRef ((_ : TransparentToplevel ).toplevel.middle.get.bottom.mapa(" str" ))
64
64
val obj = TransparentToplevel (Toplevel (Middle (Bottom (Map (" str" -> 42 ), Wrappy (" oof" ))).opt))
@@ -67,7 +67,7 @@ class GenRefTest extends AnyFunSuite {
67
67
68
68
test(" sealed trait common field test" ) {
69
69
val ref = GenRef .create[Toplevel ].ref(_.seal.id)
70
- assert(ref.rawRef.normalize.toList == List (" seal" , " _id" ).map(RawRef .Field ))
70
+ assert(ref.rawRef.normalize.toList == List (" seal" , " _id" ).map(RawRef .Field .apply ))
71
71
}
72
72
73
73
test(" generic sealed trait common field test" ) {
0 commit comments