public void ShouldPassMeasurementAndFieldSetOnly() { string point = "parity blocknum=123456,numpeers=12,blockts=1465839830100400200,numtxinblock=23,propagationtime=0"; bool result = InfluxPointVerifier.VerifyPoint(point); result.Should().BeTrue(); }
public void ShouldPassOptionalTimeStamp() { string point = "parity,nodeid=0x000000000000000000 blocknum=123456,numpeers=12,blockts=1465839830100400200,numtxinblock=23,propagationtime=0"; bool result = InfluxPointVerifier.VerifyPoint(point); result.Should().BeTrue(); }
public void ShouldNotAllowEmptyInput() { string point = ""; var exception = Assert.Throws <Exception>(() => InfluxPointVerifier.VerifyPoint(point)); Assert.NotNull(exception); Assert.Contains("Invalid Point there must be at least measurement and fieldset seperated by a space, or there must not be tokens other then (measurementtagset fieldset timestamp)", exception.Message); }
public void ShouldNotPassInvalidTimeStamp() { string point = "parity,nodeid=0x00000000000000000000000,client=Parityv123 blocknum=123456,numpeers=12,blockts=1465839830100400200,numtxinblock=23,propagationtime=0 1465839ert830100400200"; //Assert.Throws<Exception>(() => InfluxPointVerifier.verifyPoint(point)); var exception = Assert.Throws <Exception>(() => InfluxPointVerifier.VerifyPoint(point)); Assert.NotNull(exception); Assert.Contains("Invalid timestamp", exception.Message); }
public void ShouldPassValidPoint(string point) { bool result = InfluxPointVerifier.VerifyPoint(point); result.Should().BeTrue(); }