@@ -5,7 +5,7 @@ import Testing
55struct PersistedProductConversionsTests {
66
77 @Test ( " PersistedProduct init(from:) maps all POSProduct fields " )
8- func test_product_init_from_posProduct_maps_all_fields ( ) throws {
8+ func product_init_from_posProduct_maps_all_fields ( ) throws {
99 // Given
1010 let siteID : Int64 = 1
1111 let productID : Int64 = 10
@@ -24,8 +24,8 @@ struct PersistedProductConversionsTests {
2424 alt: nil )
2525 ]
2626 let attributes : [ ProductAttribute ] = [
27- ProductAttribute ( siteID: siteID, attributeID: 0 , name: " Color " , position: 0 , visible: true , variation: true , options: [ " Red " , " Blue " ] ) ,
28- ProductAttribute ( siteID: siteID, attributeID: 0 , name: " Size " , position: 1 , visible: false , variation: false , options: [ " S " , " M " ] )
27+ ProductAttribute ( siteID: siteID, attributeID: 0 , name: " Color " , position: 0 , visible: true , variation: true , options: [ ] ) ,
28+ ProductAttribute ( siteID: siteID, attributeID: 0 , name: " Size " , position: 1 , visible: false , variation: false , options: [ ] )
2929 ]
3030 let pos = POSProduct (
3131 siteID: siteID,
@@ -54,8 +54,8 @@ struct PersistedProductConversionsTests {
5454 #expect( persisted. siteID == siteID)
5555 #expect( persisted. name == pos. name)
5656 #expect( persisted. productTypeKey == pos. productTypeKey)
57- #expect( persisted. fullDescription == " Full " )
58- #expect( persisted. shortDescription == " Short " )
57+ #expect( persisted. fullDescription == pos . fullDescription )
58+ #expect( persisted. shortDescription == pos . shortDescription )
5959 #expect( persisted. sku == pos. sku)
6060 #expect( persisted. globalUniqueID == pos. globalUniqueID)
6161 #expect( persisted. price == pos. price)
@@ -67,7 +67,7 @@ struct PersistedProductConversionsTests {
6767 }
6868
6969 @Test ( " PersistedProduct toPOSProduct maps back with images and attributes " )
70- func test_product_toPOSProduct_maps_back_including_images_and_attributes ( ) throws {
70+ func product_toPOSProduct_maps_back_including_images_and_attributes ( ) throws {
7171 // Given
7272 let siteID : Int64 = 2
7373 let productID : Int64 = 20
@@ -106,8 +106,8 @@ struct PersistedProductConversionsTests {
106106 ]
107107
108108 let persistedAttributes = [
109- PersistedProductAttribute ( productID: productID, name: " Material " , position: 0 , visible: true , variation: false , options: [ " Cotton " ] ) ,
110- PersistedProductAttribute ( productID: productID, name: " Fit " , position: 1 , visible: true , variation: true , options: [ " Slim " , " Regular " ] )
109+ PersistedProductAttribute ( productID: productID, name: " Material " , position: 0 , visible: true , variation: false , options: [ ] ) ,
110+ PersistedProductAttribute ( productID: productID, name: " Fit " , position: 1 , visible: true , variation: true , options: [ ] )
111111 ]
112112
113113 // When
@@ -137,7 +137,7 @@ struct PersistedProductConversionsTests {
137137 }
138138
139139 @Test ( " PersistedProductAttribute init(from:) and toProductAttribute round-trip " )
140- func test_product_attribute_round_trip ( ) throws {
140+ func product_attribute_round_trip ( ) throws {
141141 // Given
142142 let siteID : Int64 = 3
143143 let productID : Int64 = 30
@@ -170,7 +170,7 @@ struct PersistedProductConversionsTests {
170170 }
171171
172172 @Test ( " PersistedProductImage init(from:) and toProductImage round-trip " )
173- func test_product_image_round_trip ( ) throws {
173+ func product_image_round_trip ( ) throws {
174174 // Given
175175 let productID : Int64 = 40
176176 let image = ProductImage ( imageID: 400 ,
0 commit comments