public void GetBaseAsGuidV1Test() { var correlationVector = new CorrelationVectorV1(); Assert.ThrowsException <InvalidOperationException>(() => correlationVector.GetBaseAsGuid(), "V1 correlation vector base cannot be converted to a guid"); }
public void SimpleIncrementCorrelationVectorTest() { var correlationVector = new CorrelationVectorV1(); correlationVector.Increment(); var splitVector = correlationVector.Value.Split('.'); Assert.AreEqual("1", splitVector[1], "Correlation Vector extension should have been incremented by one"); }
public void CreateV1CorrelationVectorTest() { var correlationVector = new CorrelationVectorV1(); var splitVector = correlationVector.Value.Split('.'); Assert.AreEqual(2, splitVector.Length, "Correlation Vector should be created with two components separated by a '.'"); Assert.AreEqual(16, splitVector[0].Length, "Correlation Vector base should be 16 characters long"); Assert.AreEqual("0", splitVector[1], "Correlation Vector extension should start with zero"); }
public void ValidateCreationTest() { CorrelationVector.ValidateCorrelationVectorDuringCreation = true; var correlationVector = new CorrelationVectorV1(); correlationVector.Increment(); var splitVector = correlationVector.Value.Split('.'); Assert.AreEqual("1", splitVector[1], "Correlation Vector extension should have been incremented by one"); }
public void SimpleExtendCorrelationVectorTest() { CorrelationVector correlationVector = new CorrelationVectorV1(); var splitVector = correlationVector.Value.Split('.'); var vectorBase = splitVector[0]; var extension = splitVector[1]; correlationVector = CorrelationVector.Extend(correlationVector.Value); splitVector = correlationVector.Value.Split('.'); Assert.AreEqual(3, splitVector.Length, "Correlation Vector should contain 3 components separated by a '.' after extension"); Assert.AreEqual(vectorBase, splitVector[0], "Correlation Vector base should contain the same base after extension"); Assert.AreEqual(extension, splitVector[1], "Correlation Vector should preserve original "); Assert.AreEqual("0", splitVector[2], "Correlation Vector new extension should start with zero"); }