organize + graph

This commit is contained in:
mr
2024-07-18 11:51:12 +02:00
parent 2eb74da9d2
commit 29a75bced9
69 changed files with 952 additions and 1531 deletions

View File

@@ -0,0 +1,45 @@
package processing
import (
resources "oc-lib/models/resources"
"testing"
"github.com/stretchr/testify/assert"
)
func TestStoreOneProcessing(t *testing.T) {
p := Processing{Container: "totoCont",
AbstractResource: resources.AbstractResource{
Uuid: "123",
Name: "testData",
Description: "Lorem Ipsum",
Logo: "azerty.com",
Owner: "toto",
OwnerLogo: "totoLogo",
SourceUrl: "azerty.fr",
},
}
sma := ProcessingMongoAccessor{}
id := sma.StoreOne(&p)
assert.NotEmpty(t, id)
}
func TestLoadOneProcessing(t *testing.T) {
p := Processing{Container: "totoCont",
AbstractResource: resources.AbstractResource{
Uuid: "123",
Name: "testData",
Description: "Lorem Ipsum",
Logo: "azerty.com",
Owner: "toto",
OwnerLogo: "totoLogo",
SourceUrl: "azerty.fr",
},
}
sma := ProcessingMongoAccessor{}
new_s := sma.StoreOne(&p)
assert.Equal(t, p, new_s)
}