示例#1
0
        public void ReportError_GivenAMessageString_StoresMessageAndSetsHasErrorStatus()
        {
            const string errorMessage = "some error";
            var codingContext = new CodingContext();
            codingContext.ReportError(errorMessage);

            Assert.AreEqual ( codingContext.ErrorNote, errorMessage );
            Assert.AreEqual ( codingContext.CodingStatus, CodingStatus.HasError );
        }
示例#2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Procedure"/> class.
        /// </summary>
        /// <param name="codingContext">The coding context.</param>
        /// <param name="procedureType">Type of the procedure.</param>
        /// <param name="activity">The activity.</param>
        /// <param name="procedureCode">The procedure code.</param>
        /// <param name="unitCount">The unit count.</param>
        protected internal Procedure(CodingContext codingContext, ProcedureType procedureType, Activity activity, CodedConcept procedureCode, UnitCount unitCount)
            : base(codingContext)
        {
            if (procedureType == ProcedureType.Activity)
            {
                Check.IsNotNull(activity, "Activity is required for activity procedure type.");
            }

            Check.IsNotNull(procedureCode, "Procedure code is required.");

            CodingContext = codingContext;
            ProcedureType = procedureType;
            Activity = activity;
            ProcedureCode = procedureCode;
            BillingUnitCount = unitCount;
        }
示例#3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Procedure"/> class.
        /// </summary>
        /// <param name="codingContext">The coding context.</param>
        /// <param name="procedureType">Type of the procedure.</param>
        /// <param name="activity">The activity.</param>
        /// <param name="procedureCode">The procedure code.</param>
        /// <param name="unitCount">The unit count.</param>
        protected internal Procedure(CodingContext codingContext, ProcedureType procedureType, Activity activity, CodedConcept procedureCode, UnitCount unitCount)
            : base(codingContext)
        {
            if (procedureType == ProcedureType.Activity)
            {
                Check.IsNotNull(activity, "Activity is required for activity procedure type.");
            }

            Check.IsNotNull(procedureCode, "Procedure code is required.");

            CodingContext    = codingContext;
            ProcedureType    = procedureType;
            Activity         = activity;
            ProcedureCode    = procedureCode;
            BillingUnitCount = unitCount;
        }
示例#4
0
 public void ReportError_GivenNull_ThrowsArgumentException()
 {
     var codingContext = new CodingContext ();
     codingContext.ReportError ( null );
 }
示例#5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CodingContextAggregateNodeBase"/> class.
 /// </summary>
 /// <param name="codingContext">The coding context.</param>
 protected CodingContextAggregateNodeBase(CodingContext codingContext)
 {
     Check.IsNotNull(codingContext, "Coding context is required.");
     _codingContext = codingContext;
 }