Example #1
0
        public void ChangeCassetteTest()
        {
            Mock<ICommunication> plcComm = PlcHelper.GetPlcCommunicationMock();
            DemountPlc privateTarget = new DemountPlc(plcComm.Object);
            DemountPlc_Accessor target = new DemountPlc_Accessor(new PrivateObject(privateTarget,
                                                                 new PrivateType(typeof(DemountPlc))));

            target.Open();
            target.ChangeCassette(DemountCassetteStation.Station1, WaferSize.Size8Inches, DemountCassetteHopper.Hopper1);

            plcComm.Verify(x => x.Write(It.IsAny<string>()), Times.Exactly(1));
            plcComm.Verify(x => x.Write(GetWriteCommandChangeCassette(DemountCassetteStation.Station1, WaferSize.Size8Inches, DemountCassetteHopper.Hopper1)), Times.Exactly(1));
        }
Example #2
0
        public void CarrierPlateRoutingTest()
        {
            Mock<ICommunication> plcComm = PlcHelper.GetPlcCommunicationMock();
            DemountPlc privateTarget = new DemountPlc(plcComm.Object);
            DemountPlc_Accessor target = new DemountPlc_Accessor(new PrivateObject(privateTarget,
                                                                 new PrivateType(typeof(DemountPlc))));

            target.Open();
            target.CarrierPlateRouting(CarrierPlateRoutingType.BackThroughAwps);

            plcComm.Verify(x => x.Write(It.IsAny<string>()), Times.Exactly(1));
            plcComm.Verify(x => x.Write(GetWriteCommandCarrierPlateRouting(CarrierPlateRoutingType.BackThroughAwps)), Times.Exactly(1));
        }
Example #3
0
        public void WriteBarcodeError2Test()
        {
            Mock<ICommunication> plcComm = PlcHelper.GetPlcCommunicationMock();
            DemountPlc_Accessor target = new DemountPlc_Accessor(plcComm.Object);

            target.Open();
            target.WriteBarcodeError(false);

            plcComm.Verify(x => x.Write(It.IsAny<string>()), Times.Exactly(1));
            plcComm.Verify(x => x.Write(PlcHelper.GetBoolWriteCommand(false, 0x121)), Times.Exactly(1));
        }
Example #4
0
        public void SpatulaInspectionRequired1Test()
        {
            Mock<ICommunication> plcComm = PlcHelper.GetPlcCommunicationMock();
            DemountPlc privateTarget = new DemountPlc(plcComm.Object);
            DemountPlc_Accessor target = new DemountPlc_Accessor(new PrivateObject(privateTarget,
                                                                 new PrivateType(typeof(DemountPlc))));

            target.Open();
            target.SpatulaInspectionRequired();

            plcComm.Verify(x => x.Write(It.IsAny<string>()), Times.Exactly(1));
            plcComm.Verify(x => x.Write(PlcHelper.GetBoolWriteCommand(true, 0x140)), Times.Exactly(1));
        }