public void AddPage1() { string base64image = servImage.ToBase64String(TakeDocModel.Environnement.JpegTestFile1); servDocument.AddPage(userId, entityId, MyDocument.DocumentId, base64image, "jpeg", 0); TakeDocModel.Version version = servVersion.GetById(MyDocument.LastVersion.VersionId, x => x.Page); Assert.AreEqual(version.LastPage.UserCreateData, userId); Assert.AreEqual(version.LastPage.EntityId, entityId); Assert.IsNotNull(version.LastPage.DateCreateData); Assert.IsNotNull(version.LastPage.PageNumber); Assert.AreNotEqual(version.LastPage.DateCreateData, System.DateTimeOffset.MinValue); Assert.IsFalse(version.LastPage.EtatDeleteData); }
public void CreateDocumentTest() { TakeDocModel.Environnement.Init(System.Configuration.ConfigurationManager.AppSettings); TakeDocModel.TypeDocument typeDocument = daoTypeDocument.GetBy(x => x.TypeDocumentReference == "NOTE_FRAIS").First(); MyDocument = servDocument.Create(userId, entityId, typeDocument.TypeDocumentId, "Test creation document"); string base64image = servImage.ToBase64String(TakeDocModel.Environnement.JpegTestFile1); servDocument.AddPage(userId, entityId, MyDocument.DocumentId, base64image, "jpeg", 90); }