Beispiel #1
0
        public void EmptyArgumentsTest()
        {
            var predictionCLI = new PredictionCLI();

            Assert.IsNotNull(predictionCLI);

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

            Assert.IsFalse(argResult);
        }
Beispiel #2
0
        public void RunPrediction_Null()
        {
            var predictionCLI = new PredictionCLI();

            Assert.IsNotNull(predictionCLI);

            predictionCLI.LoadArguments(null);

            predictionCLI.RunPrediction();
        }
Beispiel #3
0
        public void NullArgumentsTest()
        {
            var predictionCLI = new PredictionCLI();

            Assert.IsNotNull(predictionCLI);

            var argResult = predictionCLI.LoadArguments(null);

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

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

            predictionCli.RunPrediction();
        }
Beispiel #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);
        }
Beispiel #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();
        }
Beispiel #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();
        }
Beispiel #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();
        }
Beispiel #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);
        }