コード例 #1
0
        public void CreateNew_GetItselfReturnsCorrectly()
        {
            var tableEntity = new TableEntity()
            {
                Eid = 0
            };
            var dictionaryGraphNode = new DictionaryGraphNode <TableEntity>(tableEntity.Eid, tableEntity);

            var response = dictionaryGraphNode.Get(tableEntity.Eid);

            response.Should().Be(tableEntity);
        }
コード例 #2
0
        public void Get_FindsChild()
        {
            var tableEntity = new TableEntity()
            {
                Eid = 0
            };
            var tableEntity2 = new TableEntity()
            {
                Eid = 1
            };
            var dictionaryGraphNode  = new DictionaryGraphNode <TableEntity>(tableEntity.Eid, tableEntity);
            var dictionaryGraphNode2 = new DictionaryGraphNode <TableEntity>(tableEntity2.Eid, tableEntity2);

            dictionaryGraphNode.Add(dictionaryGraphNode2);

            dictionaryGraphNode.Get(tableEntity2.Eid).Should().Be(tableEntity2);
        }