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 ); }
/// <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; }
public void ReportError_GivenNull_ThrowsArgumentException() { var codingContext = new CodingContext (); codingContext.ReportError ( null ); }
/// <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; }