Exemple #1
0
        public void Test2()
        {
            var cq  = new CertificateQuality(100);
            var doc = new AttachedDocument(100);

            doc.Content = ImagesConverter.ToByteArray(new Bitmap(@"D:\Repositories\HalfbloodApp\Halfblood.UnitTests\Halfblood.UnitTests\36.jpg"));
            cq.Documents.Add(doc);

            var context = new CopyContext <CertificateQuality>(cq);

            context.Commit();
        }
Exemple #2
0
        public void Commit()
        {
            Assert.That(_copyContext.Value, Is.Not.Null);
            Assert.That(_copyContext.Value, Is.EqualTo(_instance));

            _copyContext.Value.CreationDate         = new DateTime(2000, 1, 1);
            _copyContext.Value.GroundTypeOfDocument = new TypeOfDocument();

            _copyContext.Commit();

            Assert.That(_instance.Rn, Is.EqualTo(_copyContext.Value.Rn));
            Assert.That(_instance.CreationDate, Is.EqualTo(_copyContext.Value.CreationDate));
            Assert.That(_instance.GroundReceiptTypeOfDocument, Is.EqualTo(_copyContext.Value.GroundReceiptTypeOfDocument));
            Assert.That(_instance, Is.EqualTo(_copyContext.Value));
        }