public void VerifyThatStartNonQuantityKindRowDragReturnsProperPayload() { var dragInfo = new Mock <IDragInfo>(); dragInfo.SetupProperty(x => x.Payload); var booleanParameterType = new BooleanParameterType(Guid.NewGuid(), null, null); var booleanParameterTypeRowViewModel = new ParameterTypeRowViewModel(booleanParameterType, this.session.Object, null); booleanParameterTypeRowViewModel.StartDrag(dragInfo.Object); Assert.IsInstanceOf <Tuple <ParameterType, MeasurementScale> >(dragInfo.Object.Payload); var payload = (Tuple <ParameterType, MeasurementScale>)dragInfo.Object.Payload; Assert.AreEqual(booleanParameterType, payload.Item1); Assert.IsNull(payload.Item2); }
public void VerifyThatStartQuantityKindRowDragReturnsProperPayload() { var dragInfo = new Mock <IDragInfo>(); dragInfo.SetupProperty(x => x.Payload); var simpleQuantityKind = new SimpleQuantityKind(Guid.NewGuid(), null, null); var ratioScale = new RatioScale(Guid.NewGuid(), null, null); simpleQuantityKind.DefaultScale = ratioScale; var simpleQuantityKindRowViewModel = new ParameterTypeRowViewModel(simpleQuantityKind, this.session.Object, null); simpleQuantityKindRowViewModel.StartDrag(dragInfo.Object); Assert.IsInstanceOf <Tuple <ParameterType, MeasurementScale> >(dragInfo.Object.Payload); var payload = (Tuple <ParameterType, MeasurementScale>)dragInfo.Object.Payload; Assert.AreEqual(simpleQuantityKind, payload.Item1); Assert.AreEqual(ratioScale, payload.Item2); }