コード例 #1
0
        public void AssumptionValidator_LessThan_Lower_Input_Test()
        {
            string error = InputValidator.AssumptionEmptyContainerValidator("-1", 10, out long emptyContainerAssumption);

            Assert.AreEqual("\n Assumption should be in the range [1, 10]", error);
            Assert.AreEqual(-1, emptyContainerAssumption);
        }
コード例 #2
0
        public void AssumptionValidator_Valid_Input_Test()
        {
            string error = InputValidator.AssumptionEmptyContainerValidator("2", 10, out long emptyContainerAssumption);

            Assert.AreEqual(string.Empty, error);
            Assert.AreEqual(2, emptyContainerAssumption);
        }
コード例 #3
0
        public void AssumptionValidator_String_Input_Test()
        {
            string error = InputValidator.AssumptionEmptyContainerValidator("aaa", 10, out long emptyContainerAssumption);

            Assert.AreEqual("Invalid Assumption!", error);
            Assert.AreEqual(0, emptyContainerAssumption);
        }
コード例 #4
0
        public void AssumptionValidator_GreaterThan_Upper_Input_Test()
        {
            string error = InputValidator.AssumptionEmptyContainerValidator("12", 10, out long emptyContainerAssumption);

            Assert.AreEqual("\n Assumption should be in the range [1, 10]", error);
            Assert.AreEqual(12, emptyContainerAssumption);
        }