| Line 147... |
Line 147... |
| 147 |
assertEquals(Arrays.asList("A37 5G (8GB/128GB)", "A37 5G (12GB/256GB)"),
|
147 |
assertEquals(Arrays.asList("A37 5G (8GB/128GB)", "A37 5G (12GB/256GB)"),
|
| 148 |
ProductNames.split("A37 5G (8GB/128GB)A37 5G (12GB/256GB)"));
|
148 |
ProductNames.split("A37 5G (8GB/128GB)A37 5G (12GB/256GB)"));
|
| 149 |
}
|
149 |
}
|
| 150 |
|
150 |
|
| 151 |
/**
|
151 |
/**
|
| - |
|
152 |
* A comma-separated part that starts with a LETTER is a product, never a memory
|
| - |
|
153 |
* spec, however many digits and G/T characters follow it.
|
| - |
|
154 |
*
|
| - |
|
155 |
* VARIANT_ONLY's unit group used to be reachable at position 0, so the "G" of a
|
| - |
|
156 |
* Motorola G-series name read as the unit and "06"/"37" fell through the trailing
|
| - |
|
157 |
* class. "G06, G37 , G37 Power" then collapsed to two entities - "G06" and
|
| - |
|
158 |
* "G06 G37" - and G37, a real catalog SKU, lost its cashback on five offers.
|
| - |
|
159 |
* Realme "GT 7" matched identically and escaped only by never following a comma.
|
| - |
|
160 |
*/
|
| - |
|
161 |
@Test
|
| - |
|
162 |
public void keepsLetterLedModelNamesOutOfVariantInheritance() {
|
| - |
|
163 |
assertEquals(Arrays.asList("G06", "G37", "G37 Power"),
|
| - |
|
164 |
ProductNames.split("G06, G37 , G37 Power"));
|
| - |
|
165 |
|
| - |
|
166 |
assertEquals(Arrays.asList("GT 7T", "GT 7"),
|
| - |
|
167 |
ProductNames.split("GT 7T, GT 7"));
|
| - |
|
168 |
|
| - |
|
169 |
assertEquals(Arrays.asList("G06", "G37", "G37 Power", "G77 Power", "G Max",
|
| - |
|
170 |
"Edge 70 Fusion (12/256)", "Edge 60 Pro (8+256)"),
|
| - |
|
171 |
ProductNames.split("G06, G37, G37 Power , G77 Power, G Max ,"
|
| - |
|
172 |
+ " Edge 70 Fusion (12/256) , Edge 60 Pro (8+256)"));
|
| - |
|
173 |
|
| - |
|
174 |
// and the inheritance it guards must still fire for genuine memory specs
|
| - |
|
175 |
assertEquals(Arrays.asList("RENO 15 PRO 256GB", "RENO 15 PRO 512GB"),
|
| - |
|
176 |
ProductNames.split("RENO 15 PRO 256GB, 512GB"));
|
| - |
|
177 |
assertEquals(Arrays.asList("F33 6+128GB", "F33 8+128GB", "F33 8+256GB"),
|
| - |
|
178 |
ProductNames.split("F33 6+128GB, 8+128GB, 8+256GB"));
|
| - |
|
179 |
}
|
| - |
|
180 |
|
| - |
|
181 |
/**
|
| 152 |
* Two variant groups written back-to-back are two variants of one model. Merged,
|
182 |
* Two variant groups written back-to-back are two variants of one model. Merged,
|
| 153 |
* their memory tokens ran together and the offer bound to one arbitrary SKU while
|
183 |
* their memory tokens ran together and the offer bound to one arbitrary SKU while
|
| 154 |
* the other variant silently got nothing - money on the wrong SKU, same failure
|
184 |
* the other variant silently got nothing - money on the wrong SKU, same failure
|
| 155 |
* class as the missing-unit bug.
|
185 |
* class as the missing-unit bug.
|
| 156 |
*/
|
186 |
*/
|