Beispiel #1
0
        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);
        }
Beispiel #4
0
 internal void AddTestAttachment(TestAttachment attachment)
 {
     _testAttachments.Add(attachment);
 }
Beispiel #5
0
            public void Commit(Node hub, CommitID commitID)
            {
                TestAttachment attach = (TestAttachment)hub.Attachment;

                attach.Received.Enqueue(Index);
            }