Ejemplo n.º 1
0
 ////////////////////////////////////////////////////////////////////////////////////////////////
 /*--------------------------------------------------------------------------------------------*/
 public static void CheckNewVertex(Vertex pVertex, VertexType.Id pType)
 {
     Assert.NotNull(pVertex.Id, "Incorrect Id.");
     Assert.Less(1L, pVertex.VertexId, "Incorrect VertexId.");
     Assert.AreEqual((byte)pType, pVertex.VertexType, "Incorrect VertexType.");
     Assert.Less(DateTime.UtcNow.AddMinutes(-1).Ticks, pVertex.Timestamp, "Incorrect Timestamp.");
 }
Ejemplo n.º 2
0
        public void AddTypeFilterYes(Type pStepType, Type pPathType, VertexType.Id pVertType)
        {
            const string dbName      = DbName.Vert.Vertex.VertexType;
            const string dbNameParam = "_P0";
            const string typeIdParam = "_P1";
            const string script      = ".has(" + dbNameParam + ", Tokens.T.eq, " + typeIdParam + ")";

            vMockPath.Setup(x => x.AddScript(script));
            vMockPath.Setup(x => x.AddParam(dbName)).Returns(dbNameParam);
            vMockPath.Setup(x => x.AddParam((byte)pVertType)).Returns(typeIdParam);

            TravStepEntry.AddTypeFilterIfNecessary(vMockPath.Object, pStepType, pPathType);

            vMockPath.Verify(x => x.AddScript(script), Times.Once);
        }
Ejemplo n.º 3
0
        public override void SetUp()
        {
            base.SetUp();

            vVertType          = VertexType.Id.Factor;
            vVertTypeProp      = DbName.Vert.Vertex.VertexType;
            vVertTypePropParam = "_P0";
            vVertTypeParam     = "_P1";
            vScript            = ".has(" + vVertTypePropParam + ", Tokens.T.eq, " + vVertTypeParam + ")";
            vToType            = typeof(FabArtifact);
            vStep = new TravStepTo <FabFactor, FabArtifact>("cmd", vVertType);

            MockItem.Setup(x => x.VerifyParamCount(0, -1));

            MockPath.Setup(x => x.AddParam(vVertTypeProp)).Returns(vVertTypePropParam);
            MockPath.Setup(x => x.AddParam(vVertType)).Returns(vVertTypeParam);
            MockPath.Setup(x => x.AddScript(vScript));
        }
Ejemplo n.º 4
0
 ////////////////////////////////////////////////////////////////////////////////////////////////
 /*--------------------------------------------------------------------------------------------*/
 public TravStepTo(string pCmd, VertexType.Id pType) : base(pCmd)
 {
     vType         = pType;
     FromExactType = true;
 }