public void GreedyAlgorithm_Empty()
        {
            Parom parom = new Parom(20);

            parom.subset = null;
            parom.GreedyAlgorithm();
            Assert.Equal(null, parom.subset);
        }
        public void GreedyAlgorithm_Alone()
        {
            Parom parom = new Parom(20);

            parom.subset.Add(new Automobile(2, 18));
            parom.GreedyAlgorithm();
            Assert.Equal(parom.result[0].weight, parom.subset[0].weight);
            Assert.Equal(parom.result[0].price, parom.subset[0].price);
            Assert.Equal(parom.result[0].koef, parom.subset[0].koef);
        }
        public void EnumAuto_FULL()
        {
            Parom parom = new Parom(20);

            parom.subset.Add(new Automobile(2, 18));
            parom.subset.Add(new Automobile(10, 23));
            parom.subset.Add(new Automobile(4, 211));
            parom.subset.Add(new Automobile(4, 98));
            parom.subset.Add(new Automobile(5, 28));
            parom.GreedyAlgorithm();
            Assert.Equal(parom.bestPrice, 355);
        }
        public void GreedyAlgorithm_SortKoef()
        {
            Parom parom = new Parom(20);

            parom.subset.Add(new Automobile(3, 67));
            parom.subset.Add(new Automobile(2, 94));
            parom.GreedyAlgorithm();
            Assert.Equal(parom.subset[0].weight, 2);
            Assert.Equal(parom.subset[0].price, 94);
            Assert.Equal(parom.subset[1].weight, 3);
            Assert.Equal(parom.subset[1].price, 67);
        }
        public void GreedyAlgorithm_Test()
        {
            Parom parom = new Parom(20);

            parom.subset.Add(new Automobile(3, 67));
            parom.subset.Add(new Automobile(2, 94));
            parom.GreedyAlgorithm();
            Assert.Equal(parom.subset[0].weight, parom.result[0].weight);
            Assert.Equal(parom.subset[0].price, parom.result[0].price);
            Assert.Equal(parom.subset[1].weight, parom.result[1].weight);
            Assert.Equal(parom.subset[1].price, parom.result[1].price);
        }