public void VerifyThatIsDirtyMethodsThrowExceptionWhenUpdateCloneHasNotBeenCalled() { ProcessedValueSet processedValueSet; processedValueSet = new ProcessedValueSet(this.parameterValueSet, ValidationResultKind.Valid); Assert.Throws <InvalidOperationException>(() => processedValueSet.IsManualValueDirty(0)); Assert.Throws <InvalidOperationException>(() => processedValueSet.IsComputedValueDirty(0)); Assert.Throws <InvalidOperationException>(() => processedValueSet.IsReferenceValueDirty(0)); Assert.Throws <InvalidOperationException>(() => processedValueSet.IsFormulaValueDirty(0)); Assert.Throws <InvalidOperationException>(() => processedValueSet.IsValueSwitchDirty()); }
public void VerifyUpdateParameterSubscriptionValueset() { var processedValueSet = new ProcessedValueSet(this.parameterSubscriptionValueSet, ValidationResultKind.Valid); processedValueSet.UpdateClone(this.valueSetValues); Assert.IsNotNull(processedValueSet.ClonedThing); Assert.IsTrue(processedValueSet.IsManualValueDirty(0)); Assert.IsFalse(processedValueSet.IsComputedValueDirty(0)); Assert.IsFalse(processedValueSet.IsReferenceValueDirty(0)); Assert.IsFalse(processedValueSet.IsFormulaValueDirty(0)); Assert.IsTrue(processedValueSet.IsValueSwitchDirty()); this.valueSetValues = new ValueSetValues(0, this.parameterType, ParameterSwitchKind.MANUAL, "-", "-", "-", "-"); processedValueSet.UpdateClone(this.valueSetValues); Assert.IsFalse(processedValueSet.IsManualValueDirty(0)); Assert.IsFalse(processedValueSet.IsComputedValueDirty(0)); Assert.IsFalse(processedValueSet.IsReferenceValueDirty(0)); Assert.IsFalse(processedValueSet.IsFormulaValueDirty(0)); Assert.IsFalse(processedValueSet.IsValueSwitchDirty()); }