コード例 #1
0
        public void FutureReceipt_ToKey_WhenUserEmpty_ExpectException()
        {
            //------------Setup for test--------------------------
            var futureReciept = new FutureReceipt {
                PartID = 1, RequestID = RequestID, User = string.Empty
            };

            //------------Execute Test---------------------------
            futureReciept.ToKey();
        }
コード例 #2
0
        public void FutureReceipt_ToKey_WhenPartIDLessThenZero_ExpectException()
        {
            //------------Setup for test--------------------------
            var futureReciept = new FutureReceipt {
                PartID = -1, RequestID = RequestID, User = "******"
            };

            //------------Execute Test---------------------------
            futureReciept.ToKey();
        }
コード例 #3
0
        public void FutureReceipt_ToKey_WhenRequestIDNotSet_ExpectException()
        {
            //------------Setup for test--------------------------
            var futureReciept = new FutureReceipt {
                PartID = 1, User = "******"
            };

            //------------Execute Test---------------------------
            futureReciept.ToKey();
        }
コード例 #4
0
        public void FutureReceipt_ToKey_WhenValidKeyParts_ExpectKey()
        {
            //------------Setup for test--------------------------
            var futureReciept = new FutureReceipt {
                PartID = 1, RequestID = RequestID, User = "******"
            };

            //------------Execute Test---------------------------
            var result = futureReciept.ToKey();

            //------------Assert Results-------------------------
            StringAssert.Contains(result, RequestID + "-1-Bob!");
        }