[VOL-4111] Moving Services under the UNI struct
Controlling the UNI state via OMCI Set Messages
Upgraded APIs to reflect the new format
Change-Id: I3a6c166205fad4a381e562ab3b873d03b633303e
diff --git a/internal/common/omci/onu_mib_db_test.go b/internal/common/omci/onu_mib_db_test.go
index cea0daf..efb6a1b 100644
--- a/internal/common/omci/onu_mib_db_test.go
+++ b/internal/common/omci/onu_mib_db_test.go
@@ -36,6 +36,23 @@
assert.Equal(t, uint16(0), res)
}
+func TestEntityID_FromUint16(t *testing.T) {
+ id := uint16(257)
+ e := EntityID{}.FromUint16(id)
+
+ assert.Equal(t, e.ToString(), "0101")
+ assert.Equal(t, e.ToUint16(), id)
+}
+
+func TestEntityID_Equals(t *testing.T) {
+ a := EntityID{0x01, 0x01}
+ b := EntityID{0x01, 0x01}
+ c := EntityID{0x01, 0x02}
+
+ assert.True(t, a.Equals(b))
+ assert.False(t, a.Equals(c))
+}
+
func Test_GenerateMibDatabase(t *testing.T) {
const uniPortCount = 4
mibDb, err := GenerateMibDatabase(uniPortCount)