public void GetSessionInfoArgs_MinimalArgs() { var info = new PiwikSessionInfo(); var result = PiwikDataConverter.GetSessionInfoArgs(info); Assert.IsNotNull(result); AssertEqual(result, new[] { "_idvc=0" }); }
public void GetSessionInfoArgs_AllArgs() { var info = new PiwikSessionInfo() { VisitsCount = 123, UniqueVisitorId = "0123456789abcdef", UserId = "user id", FirstVisit = new DateTimeOffset(1970, 1, 1, 0, 0, 5, TimeSpan.Zero), LastVisit = new DateTimeOffset(1970, 1, 1, 0, 0, 40, TimeSpan.Zero) }; var result = PiwikDataConverter.GetSessionInfoArgs(info); Assert.IsNotNull(result); AssertEqual(result, new[] { "cid=0123456789abcdef", "_idvc=123", "uid=user%20id", "_idts=5", "_viewts=40" }); }