Exemplo n.º 1
0
        public void RecordAttachmentsShouldAddToAttachmentSetForMultipleAttachments()
        {
            var testRecorder  = new TestExecutionRecorder(null, this.testableTestRunCache);
            var attachmentSet = new List <AttachmentSet>
            {
                new AttachmentSet(new Uri("attachment://dummy"), "attachment"),
                new AttachmentSet(new Uri("attachment://infinite"), "infinity")
            };

            testRecorder.RecordAttachments(attachmentSet);

            var attachments = testRecorder.Attachments;

            Assert.IsNotNull(attachments);
            CollectionAssert.AreEqual(attachmentSet, attachments);

            var newAttachmentSet = new AttachmentSet(new Uri("attachment://median"), "mid");

            attachmentSet.Add(newAttachmentSet);

            testRecorder.RecordAttachments(new List <AttachmentSet> {
                newAttachmentSet
            });

            attachments = testRecorder.Attachments;

            Assert.IsNotNull(attachments);
            CollectionAssert.AreEqual(attachmentSet, attachments);
        }
Exemplo n.º 2
0
        public void RecordAttachmentsShouldAddToAttachmentSet()
        {
            var testRecorder  = new TestExecutionRecorder(null, this.testableTestRunCache);
            var attachmentSet = new List <AttachmentSet> {
                new AttachmentSet(new Uri("attachment://dummy"), "attachment")
            };

            testRecorder.RecordAttachments(attachmentSet);

            var attachments = testRecorder.Attachments;

            Assert.IsNotNull(attachments);
            CollectionAssert.AreEqual(attachmentSet, attachments);
        }