コード例 #1
0
        private void setFpErrorCodeLink_OpenLink(object sender, OpenLinkEventArgs e)
        {
            var failure = repairFailuresView.GetFocusedRow() as RouteStationFailure;

            if (failure != null)
            {
                m_process.ChangeFpErrorCodeOwner(failure);
            }
        }
コード例 #2
0
ファイル: UnitFailureTests.cs プロジェクト: ewin66/SCOUT_NS
        public void the_fp_error_code_should_be_allowed_to_change_to_a_different_fail_code()
        {
            RouteStationProcess process = Xpo.CreateXPObject <RouteStationProcess>();
            InventoryItem       item    = Xpo.CreateXPObject <InventoryItem>();

            process.Item = item;

            ServiceCode         firstCode = Xpo.CreateXPObject <ServiceCode>();
            RouteStationFailure firstFailure;

            firstFailure = process.AddFailure(firstCode, "first");

            Assert.That(firstFailure.IsFpErrorCode, "The first failure was not set to the fp error code!");

            ServiceCode         secondCode = Xpo.CreateXPObject <ServiceCode>();
            RouteStationFailure shouldBeFpFailure;

            shouldBeFpFailure = process.AddFailure(secondCode, "should_be_fp");

            process.ChangeFpErrorCodeOwner(shouldBeFpFailure);

            Assert.That(shouldBeFpFailure.IsFpErrorCode, "Changing of the fp error code did not succeed!");
            Assert.That(firstFailure.IsFpErrorCode == false, "The previous fp error code owner was not relieved!");
        }