public void WillGetVersionNumberFromPut() { var results = distributedHashTableStorage.Put(topologyVersion, new ExtendedPutRequest { Key = "test", Bytes = new byte[] { 1, 2, 4 }, Segment = 0, }); Assert.NotNull(results[0].Version); }
public ReadingValues() { node = MockRepository.GenerateStub <IDistributedHashTableNode>(); topologyVersion = 1; node.Stub(x => x.GetTopologyVersion()).Return(topologyVersion); distributedHashTableStorage = new DistributedHashTableStorage("test.esent", node); distributedHashTableStorage.Put(topologyVersion, new ExtendedPutRequest { Key = "test", Bytes = new byte[] { 1, 2, 4 }, Segment = 0, }); }
public WhenThereAreKeysInTable() { node = MockRepository.GenerateStub <IDistributedHashTableNode>(); topologyVersion = 9; node.Stub(x => x.GetTopologyVersion()).Return(topologyVersion); distributedHashTableStorage = new DistributedHashTableStorage("test.esent", node); replication = distributedHashTableStorage.Replication; putResult = distributedHashTableStorage.Put(topologyVersion, new ExtendedPutRequest { Tag = 0, Bytes = new byte[] { 1 }, Key = "test", Segment = 0 })[0]; }