public void SessionIdTest() { var expected = Luid.NewLuid(); var target = new RasConnection(); target.SessionId = expected; var actual = target.SessionId; Assert.AreEqual(expected, actual); }
public void NewLuidTest() { Luid expected = new Luid(1, 1); Mock <IRasHelper> mock = new Mock <IRasHelper>(); RasHelper.Instance = mock.Object; mock.Setup(o => o.AllocateLocallyUniqueId()).Returns(expected); Luid actual = Luid.NewLuid(); Assert.AreEqual(expected, actual); }
public void AllocatesTheLuidAsExpected() { var expected = new Luid(1, 1); var allocateLocallyUniqueId = new Mock <IAllocateLocallyUniqueId>(); allocateLocallyUniqueId.Setup(o => o.AllocateLocallyUniqueId()).Returns(expected); container.Setup(o => o.GetService(typeof(IAllocateLocallyUniqueId))).Returns(allocateLocallyUniqueId.Object); var actual = Luid.NewLuid(); Assert.AreEqual(expected, actual); }
public void NewLuid() { var actual = Luid.NewLuid(); Assert.AreNotEqual(Luid.Empty, actual); }