public void Attachment_sets_instance_before_onattach() { var testObject = new object(); IAttachment attachment = new TestAttachment(testObject); attachment.AttachTo(testObject); }
public void Constructor_ShouldSetProperties() { var dut = new TestAttachment(TestPlant, BlobStorageId, FileName, Parent); Assert.AreEqual(TestPlant, dut.Plant); Assert.AreEqual($"PlantA/{Parent}/{BlobStorageId.ToString()}", dut.BlobPath); Assert.AreEqual(FileName, dut.FileName); }
public void GetFullBlobPath_ShouldReturnFullBlobPath() { // Arrange var dut = new TestAttachment(TestPlant, BlobStorageId, FileName, Parent); // Act var blobContainer = "bc"; var result = dut.GetFullBlobPath(blobContainer); // Arrange Assert.AreEqual($"{blobContainer}/PlantA/{Parent}/{BlobStorageId.ToString()}/{FileName}", result); }
internal void AddTestAttachment(TestAttachment attachment) { _testAttachments.Add(attachment); }
public void Commit(Node hub, CommitID commitID) { TestAttachment attach = (TestAttachment)hub.Attachment; attach.Received.Enqueue(Index); }