Пример #1
0
        public void EmptyArgumentsTest()
        {
            var predictionCLI = new PredictionCLI();

            Assert.IsNotNull(predictionCLI);

            var argResult = predictionCLI.LoadArguments(new string[] { });

            Assert.IsFalse(argResult);
        }
Пример #2
0
        public void RunPrediction_Null()
        {
            var predictionCLI = new PredictionCLI();

            Assert.IsNotNull(predictionCLI);

            predictionCLI.LoadArguments(null);

            predictionCLI.RunPrediction();
        }
Пример #3
0
        public void NullArgumentsTest()
        {
            var predictionCLI = new PredictionCLI();

            Assert.IsNotNull(predictionCLI);

            var argResult = predictionCLI.LoadArguments(null);

            Assert.IsFalse(argResult);
        }
Пример #4
0
        internal static void Run(string[] args)
        {
            var predictionCli = new PredictionCLI();

            if (!predictionCli.LoadArguments(args))
            {
                return;
            }

            predictionCli.RunPrediction();
        }
Пример #5
0
        public void InitializedArgumentsInvalidEvaluateTest()
        {
            var predictionCLI = new PredictionCLI();

            Assert.IsNotNull(predictionCLI);

            var args = new List <string>
            {
                "-e"
            };

            var argResult = predictionCLI.LoadArguments(args.ToArray());

            Assert.IsFalse(argResult);
        }
Пример #6
0
        public void RunPrediction_InitWithInvalidPredictor()
        {
            var predictionCLI = new PredictionCLI();

            Assert.IsNotNull(predictionCLI);

            var args = new List <string>
            {
                "-pd",
                "prediction.txt",
                "-pr",
                "wick"
            };

            predictionCLI.LoadArguments(args.ToArray());

            predictionCLI.RunPrediction();
        }
Пример #7
0
        public void RunPrediction_InitWithActualModel_Predict()
        {
            var predictionCLI = new PredictionCLI();

            Assert.IsNotNull(predictionCLI);

            var args = new List <string>
            {
                "-pd",
                "prediction.txt",
                "-pr",
                new WarriorsPredictor().PredictorName
            };

            predictionCLI.LoadArguments(args.ToArray());

            predictionCLI.RunPrediction();
        }
Пример #8
0
        public void RunPrediction_InitProperlyEvaluate()
        {
            var predictionCLI = new PredictionCLI();

            Assert.IsNotNull(predictionCLI);

            var args = new List <string>
            {
                "-pd",
                "test.txt",
                "-pr",
                new WarriorsPredictor().PredictorName,
                "-e"
            };

            predictionCLI.LoadArguments(args.ToArray());

            predictionCLI.RunPrediction();
        }
Пример #9
0
        public void InitializedArgumentsValidTest()
        {
            var predictionCLI = new PredictionCLI();

            Assert.IsNotNull(predictionCLI);

            var args = new List <string>
            {
                "-pr",
                "warriors",
                "-pd",
                "test.txt",
                "-td",
                "test.txt",
                "-e"
            };

            var argResult = predictionCLI.LoadArguments(args.ToArray());

            Assert.IsTrue(argResult);
        }