@@ -106,35 +106,6 @@ private class SObjectStreamTest {
106106 System .Assert .isFalse (stream .hasNext ());
107107 }
108108
109- @IsTest
110- private static void mapSome () {
111- List <Account > accounts = new List <Account >{
112- new Account (Name = ' Ok' , Description = ' 1' ),
113- new Account (Name = ' Wrong' , Description = ' 2' ),
114- new Account (Name = ' Ok' , Description = ' 3' )
115- };
116-
117- SObjectStream stream = SObjectStream .of (accounts ).mapSome (
118- Fn .Match .field (Account .Name ).eq (' Ok' ),
119- Fn .MapTo (Opportunity .SObjectType )
120- .mapField (Opportunity .Name , Account .Name )
121- .mapField (Opportunity .Description , Account .Description )
122- );
123- System .Assert .isTrue (stream .hasNext ());
124- Opportunity opp1 = (Opportunity ) stream .next ();
125- System .Assert .areEqual (' 1' , opp1 .Description );
126-
127- System .Assert .isTrue (stream .hasNext ());
128- Account acc2 = (Account ) stream .next ();
129- System .Assert .areEqual (' 2' , acc2 .Description );
130-
131- System .Assert .isTrue (stream .hasNext ());
132- Opportunity opp2 = (Opportunity ) stream .next ();
133- System .Assert .areEqual (' 3' , opp2 .Description );
134-
135- System .Assert .isFalse (stream .hasNext ());
136- }
137-
138109 @IsTest
139110 private static void toList () {
140111 List <Account > accounts = new List <Account >{
0 commit comments