Beispiel #1
0
        public void ApprovalMatrixExistsTest()
        {
            WfApprovalMatrix matrix = ApprovalMatrixHelper.PrepareServerApprovalMatrix();

            WfClientProcessDescriptorServiceProxy.Instance.ImportApprovalMatrix(matrix.ID, matrix.ToExcelStream());

            Assert.IsTrue(WfClientProcessDescriptorServiceProxy.Instance.ApprovalMatrixExists(matrix.ID));
        }
Beispiel #2
0
        public void SimpleServerApprovalMatrixToClient()
        {
            WfApprovalMatrix server = ApprovalMatrixHelper.PrepareServerApprovalMatrix();

            WfClientApprovalMatrix client = null;

            WfClientApprovalMatrixConverter.Instance.ServerToClient(server, ref client);

            client.AreSame(server);
        }
Beispiel #3
0
        public void DeletelMatrixExistsTest()
        {
            InitPrincipal("Requestor");

            WfApprovalMatrix matrix = ApprovalMatrixHelper.PrepareServerApprovalMatrix();

            WfClientProcessDescriptorServiceProxy.Instance.ImportApprovalMatrix(matrix.ID, matrix.ToExcelStream());
            WfClientProcessDescriptorServiceProxy.Instance.DeleteApprovalMatrix(matrix.ID);

            Assert.IsFalse(WfClientProcessDescriptorServiceProxy.Instance.ApprovalMatrixExists(matrix.ID));
        }
Beispiel #4
0
        public void ImportApprovalMatrixTest()
        {
            InitPrincipal("Requestor");

            WfApprovalMatrix matrix = ApprovalMatrixHelper.PrepareServerApprovalMatrix();

            WfClientProcessDescriptorServiceProxy.Instance.ImportApprovalMatrix(matrix.ID, matrix.ToExcelStream());

            Stream stream = WfClientProcessDescriptorServiceProxy.Instance.ExportApprovalMatrix(matrix.ID);

            WorkBook workBook = WorkBook.Load(stream);

            WfApprovalMatrix deserialized = workBook.ToApprovalMatrix();

            deserialized.ID = matrix.ID;

            matrix.AreSame(deserialized);
        }