示例#1
0
        public void GetCombinedAttachmentSetsShouldReturnFirstArgumentIfSecondArgumentIsNull()
        {
            Collection <AttachmentSet> Attachments1 = new Collection <AttachmentSet>();
            AttachmentSet attachmentset1            = new AttachmentSet(new Uri("DataCollection://Attachment/v1"), "AttachmentV1");

            attachmentset1.Attachments.Add(new UriDataAttachment(new Uri("DataCollection://Attachment/v11"), "AttachmentV1-Attachment1"));
            Attachments1.Add(attachmentset1);

            var result = DataCollectionTestRunEventsHandler.GetCombinedAttachmentSets(Attachments1, null);

            Assert.AreEqual(1, result.Count);
            Assert.AreEqual(1, result.First().Attachments.Count);
        }
示例#2
0
        public void GetCombinedAttachmentSetsShouldReturnCombinedAttachments()
        {
            Collection <AttachmentSet> Attachments1 = new Collection <AttachmentSet>();
            AttachmentSet attachmentset1            = new AttachmentSet(new Uri("DataCollection://Attachment/v1"), "AttachmentV1");

            attachmentset1.Attachments.Add(new UriDataAttachment(new Uri("DataCollection://Attachment/v11"), "AttachmentV1-Attachment1"));
            Attachments1.Add(attachmentset1);

            Collection <AttachmentSet> Attachments2 = new Collection <AttachmentSet>();
            AttachmentSet attachmentset2            = new AttachmentSet(new Uri("DataCollection://Attachment/v1"), "AttachmentV1");

            attachmentset2.Attachments.Add(new UriDataAttachment(new Uri("DataCollection://Attachment/v12"), "AttachmentV1-Attachment2"));

            Attachments2.Add(attachmentset2);

            var result = DataCollectionTestRunEventsHandler.GetCombinedAttachmentSets(Attachments1, Attachments2);

            Assert.AreEqual(1, result.Count);
            Assert.AreEqual(2, result.First().Attachments.Count);
        }
示例#3
0
        public void GetCombinedAttachmentSetsShouldReturnNullIfFirstArgumentIsNull()
        {
            var result = DataCollectionTestRunEventsHandler.GetCombinedAttachmentSets(null, null);

            Assert.IsNull(result);
        }