public void CheckParameterShortStreamThrowsPclExceptionTest()
        {
            string stream = "".PadLeft(23, '0');

            PolishingStatusFromStreamConverter privateTarget = new PolishingStatusFromStreamConverter();
            PolishingStatusFromStreamConverter_Accessor target = new PolishingStatusFromStreamConverter_Accessor(new PrivateObject(privateTarget, new PrivateType(typeof(PolishingStatusFromStreamConverter))));
            target.CheckParameter(stream);
        }
        public void TryConvert1Test()
        {
            PolishingStatusFromStreamConverter target = new PolishingStatusFromStreamConverter();
            PolishingShortStatus result = target.TryConvert("000100000001000100050003");

            Assert.AreEqual<PolisherState>(PolisherState.AutoProcess, result.Status[0].State);
            Assert.AreEqual<PolisherState>(PolisherState.Pause, result.Status[1].State);
            Assert.AreEqual<PolisherState>(PolisherState.AutoLoad, result.Status[2].State);
            Assert.AreEqual<bool>(true, result.Status[0].HighPressure);
            Assert.AreEqual<bool>(false, result.Status[1].HighPressure);
            Assert.AreEqual<bool>(true, result.Status[2].HighPressure);
        }
 public void ParsePolisherStateThrowsPlcException2Test()
 {
     PolishingStatusFromStreamConverter privateTarget = new PolishingStatusFromStreamConverter();
     PolishingStatusFromStreamConverter_Accessor target = new PolishingStatusFromStreamConverter_Accessor(new PrivateObject(privateTarget, new PrivateType(typeof(PolishingStatusFromStreamConverter))));
     target.ParsePolisherState("0008");
 }
 public void ParsePolisherState2Test()
 {
     PolishingStatusFromStreamConverter privateTarget = new PolishingStatusFromStreamConverter();
     PolishingStatusFromStreamConverter_Accessor target = new PolishingStatusFromStreamConverter_Accessor(new PrivateObject(privateTarget, new PrivateType(typeof(PolishingStatusFromStreamConverter))));
     Assert.AreEqual<PolisherState>(PolisherState.Pause, target.ParsePolisherState("0005"));
 }
 public void GetObjectState2ThrowsPclExceptionTest()
 {
     PolishingStatusFromStreamConverter privateTarget = new PolishingStatusFromStreamConverter();
     PolishingStatusFromStreamConverter_Accessor target = new PolishingStatusFromStreamConverter_Accessor(new PrivateObject(privateTarget, new PrivateType(typeof(PolishingStatusFromStreamConverter))));
     target.GetObject("000100000001000100050008");
 }
        public void TryConvert2Test()
        {
            PolishingStatusFromStreamConverter target = new PolishingStatusFromStreamConverter();
            PolishingShortStatus result = target.TryConvert("000000010001000700020006");

            Assert.AreEqual<PolisherState>(PolisherState.EmergencyStop, result.Status[0].State);
            Assert.AreEqual<PolisherState>(PolisherState.AutoWait, result.Status[1].State);
            Assert.AreEqual<PolisherState>(PolisherState.Alarm, result.Status[2].State);
            Assert.AreEqual<bool>(false, result.Status[0].HighPressure);
            Assert.AreEqual<bool>(true, result.Status[1].HighPressure);
            Assert.AreEqual<bool>(true, result.Status[2].HighPressure);
        }