public void Exists_NonExistingReply_ShouldReturnFalse () { var sut = new TitanicFileIO (Path.GetTempPath ()); var id = Guid.NewGuid (); sut.ExistsMessage (TitanicOperation.Reply, id).Should ().BeFalse ("because it has never been created."); }
public void Exists_ExistingReply_ShouldReturnTrue () { var sut = new TitanicFileIO (Path.GetTempPath ()); const TitanicOperation op = TitanicOperation.Reply; var message = new NetMQMessage (); message.Push ("Hello World"); message.Push ("echo"); var id = Guid.NewGuid (); sut.SaveMessage (op, id, message); sut.ExistsMessage (op, id).Should ().BeTrue ("because it has been created."); var expectedDir = sut.TitanicDirectory; var expectedFile = Path.Combine (expectedDir, id + _reply_ending); File.Delete (expectedFile); }