public void Should_not_override_channel_device_identifier() { var sourceToken = new TrackingToken(Guid.NewGuid(), "push", "123"); var sourceString = sourceToken.ToParsableString(); var result = TrackingToken.Parse(sourceString, "web", "456"); Assert.Equal(result, sourceToken); }
public void Should_parse_from_formatted_token_with_complex_device_identifier() { var sourceToken = new TrackingToken(Guid.NewGuid(), "web", "a|very|complex|token"); var sourceString = sourceToken.ToParsableString(); var result = TrackingToken.Parse(sourceString); Assert.Equal(result, sourceToken); }
public void Should_parse_and_override_channel_and_device_identifier_if_not_set() { var sourceToken = new TrackingToken(Guid.NewGuid()); var sourceString = sourceToken.ToParsableString(); var result = TrackingToken.Parse(sourceString, "push", "123"); Assert.Equal(result, new TrackingToken(sourceToken.Id, "push", "123")); }
public void Should_parse_from_formatted_token_without_channel() { var sourceToken = new TrackingToken(Guid.NewGuid()); var sourceString = sourceToken.ToParsableString(); var result = TrackingToken.Parse(sourceString); Assert.Equal(result, sourceToken); }