コード例 #1
0
ファイル: ToyTests.cs プロジェクト: IlonaLukuts/ToyRoom
        public void CompareToTest()
        {
            Toy toy1 = new Toy();
            Toy toy2 = new Toy();

            toy1.SetParameters("0-3", "Small", "Wood");
            toy1.GetPrice("Ball");
            toy2.SetParameters("0-3", "Small", "Wood");
            toy2.GetPrice("Car");
            int expected = -1;
            int actual   = toy1.CompareTo(toy2);

            Assert.AreEqual(expected, actual);
        }