diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index c544806..c9b26de 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -22,3 +22,6 @@ jobs: - name: Build SDK project run: go build working-directory: ${{ env.relativePath }} + - name: Test SDK + run: go test ./... + working-directory: ${{ env.relativePath }} diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index df21501..52d3b0a 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -24,7 +24,7 @@ jobs: run: go build working-directory: ${{ env.relativePath }} - name: Run unit tests - run: go test -o result.out -coverprofile cover.out + run: go test -coverprofile cover.out -coverpkg=./... ./... working-directory: ${{ env.relativePath }} - name: SonarCloud Scan uses: SonarSource/sonarcloud-github-action@master diff --git a/CHANGELOG.md b/CHANGELOG.md index 73d0452..7213455 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +## [0.7.0] - 2023-01-23 + +### Added + +- Added support for backing store. + ## [0.6.0] - 2022-09-22 ### Added diff --git a/go.mod b/go.mod index d6647e2..135deb9 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.18 require ( github.com/google/uuid v1.3.0 - github.com/microsoft/kiota-abstractions-go v0.16.0 + github.com/microsoft/kiota-abstractions-go v0.17.0 github.com/stretchr/testify v1.8.1 ) diff --git a/go.sum b/go.sum index b6941cc..65cd75b 100644 --- a/go.sum +++ b/go.sum @@ -9,8 +9,8 @@ github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/microsoft/kiota-abstractions-go v0.16.0 h1:DZ1L4YsRsQw39iPGnVq2fQkqLXMsazdPwmWsnaH4EZg= -github.com/microsoft/kiota-abstractions-go v0.16.0/go.mod h1:RT/s9sCzg49i4iO7e2qhyWmX+DlJDgC0P+Wp8fKQQfo= +github.com/microsoft/kiota-abstractions-go v0.17.0 h1:Ye2DTk8ko9Na0uCvhcCV7TQPWt72trT+kyD37btDtsI= +github.com/microsoft/kiota-abstractions-go v0.17.0/go.mod h1:RT/s9sCzg49i4iO7e2qhyWmX+DlJDgC0P+Wp8fKQQfo= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= diff --git a/text_parse_node.go b/text_parse_node.go index 6748ccf..5f2fd5f 100644 --- a/text_parse_node.go +++ b/text_parse_node.go @@ -248,3 +248,23 @@ func (n *TextParseNode) GetByteArrayValue() ([]byte, error) { func (n *TextParseNode) GetRawValue() (interface{}, error) { return n.value, nil } + +// GetOnBeforeAssignFieldValues returns a ByteArray value from the nodes. +func (n *TextParseNode) GetOnBeforeAssignFieldValues() absser.ParsableAction { + return nil +} + +// SetOnBeforeAssignFieldValues returns a ByteArray value from the nodes. +func (n *TextParseNode) SetOnBeforeAssignFieldValues(action absser.ParsableAction) error { + return UnsupportedMethodError +} + +// GetOnAfterAssignFieldValues returns a ByteArray value from the nodes. +func (n *TextParseNode) GetOnAfterAssignFieldValues() absser.ParsableAction { + return nil +} + +// SetOnAfterAssignFieldValues returns a ByteArray value from the nodes. +func (n *TextParseNode) SetOnAfterAssignFieldValues(action absser.ParsableAction) error { + return UnsupportedMethodError +} diff --git a/text_serialization_writer.go b/text_serialization_writer.go index d2d1e7c..84690b9 100644 --- a/text_serialization_writer.go +++ b/text_serialization_writer.go @@ -14,6 +14,7 @@ import ( var NoStructuredDataError = errors.New("text does not support structured data") var OnlyOneValue = errors.New("text serialization writer can only write one value") +var UnsupportedMethodError = errors.New("text does not support current method") // TextSerializationWriter implements SerializationWriter for JSON. type TextSerializationWriter struct { @@ -250,3 +251,31 @@ func (w *TextSerializationWriter) WriteAnyValue(key string, value interface{}) e func (w *TextSerializationWriter) Close() error { return nil } + +func (w *TextSerializationWriter) WriteNullValue(key string) error { + return NoStructuredDataError +} + +func (w *TextSerializationWriter) GetOnBeforeSerialization() absser.ParsableAction { + return nil +} + +func (w *TextSerializationWriter) SetOnBeforeSerialization(action absser.ParsableAction) error { + return UnsupportedMethodError +} + +func (w *TextSerializationWriter) GetOnAfterObjectSerialization() absser.ParsableAction { + return nil +} + +func (w *TextSerializationWriter) SetOnAfterObjectSerialization(action absser.ParsableAction) error { + return UnsupportedMethodError +} + +func (w *TextSerializationWriter) GetOnStartObjectSerialization() absser.ParsableWriter { + return nil +} + +func (w *TextSerializationWriter) SetOnStartObjectSerialization(writer absser.ParsableWriter) error { + return UnsupportedMethodError +}