Skip to content

Commit

Permalink
fds
Browse files Browse the repository at this point in the history
  • Loading branch information
marikaner committed Oct 18, 2024
1 parent c8725bf commit 2a64945
Showing 1 changed file with 0 additions and 37 deletions.
37 changes: 0 additions & 37 deletions packages/odata-v2/src/de-serializers/entity-serializer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,43 +8,6 @@ import { testEntityApi } from '../../test/test-util';
describe('with default (de-)serializers', () => {
const { serializeEntity } = entitySerializer(defaultDeSerializers);
const tsToEdm = createValueDeserializer(defaultDeSerializers);
it('should serialize simple entity', () => {
const testEntity = testEntityApi
.entityBuilder()
.stringProperty('test')
.int16Property(100)
.build();

expect(serializeEntity(testEntity, testEntityApi)).toEqual({
StringProperty: testEntity.stringProperty,
Int16Property: testEntity.int16Property
});
});

it('should serialize entity with complex type fields', () => {
const stringProperty1 = 'test';
const stringProperty2 = 'nest';
const testEntity = testEntityApi
.entityBuilder()
.complexTypeProperty({
stringProperty: stringProperty1,
complexTypeProperty: {
stringProperty: stringProperty2
}
})
.int16Property(100)
.build();

expect(serializeEntity(testEntity, testEntityApi)).toEqual({
ComplexTypeProperty: {
StringProperty: stringProperty1,
ComplexTypeProperty: {
StringProperty: stringProperty2
}
},
Int16Property: testEntity.int16Property
});
});

it('should serialize entity with custom fields', () => {
const testEntity = testEntityApi
Expand Down

0 comments on commit 2a64945

Please sign in to comment.