public void AddToIndexIntegrationTest()
        {
            Assert.Inconclusive("TODO.");

            IGraphService           target     = CreateIGraphService(); // TODO: Initialize to an appropriate value
            IndexAddToSpecification definition = null;                  // TODO: Initialize to an appropriate value
            bool expected = false;                                      // TODO: Initialize to an appropriate value
            bool actual;

            actual = target.AddToIndex(definition);
            Assert.AreEqual(expected, actual);
        }
        public void AddToIndexUnitTest()
        {
            Assert.Inconclusive("TODO");

            Fallen8 fallen8 = null;                      // TODO: Initialize to an appropriate value
            var     target  = new GraphService(fallen8); // TODO: Initialize to an appropriate value
            IndexAddToSpecification definition = null;   // TODO: Initialize to an appropriate value
            bool expected = false;                       // TODO: Initialize to an appropriate value
            bool actual;

            actual = target.AddToIndex(definition);
            Assert.AreEqual(expected, actual);
        }
Exemple #3
0
        public bool AddToIndex(IndexAddToSpecification definition)
        {
            IIndex idx;

            if (_fallen8.IndexFactory.TryGetIndex(out idx, definition.IndexId))
            {
                AGraphElement graphElement;
                if (_fallen8.TryGetGraphElement(out graphElement, definition.GraphElementId))
                {
                    idx.AddOrUpdate(ServiceHelper.CreateObject(definition.Key), graphElement);
                    return(true);
                }

                Logger.LogError(String.Format("Could not find graph element {0}.", definition.GraphElementId));
                return(false);
            }
            Logger.LogError(String.Format("Could not find index {0}.", definition.IndexId));
            return(false);
        }