コード例 #1
0
ファイル: TeamFixture.cs プロジェクト: robgray/f1speedguides
        public void Can_sign_driver_to_team()
        {
            var team = new Team {Name = "McLaren"};
            var driver = new Driver { Name = "Test Driver" };
            var season = new Season {Id = 1};

            Assert.AreEqual(0, team.Drivers.Count());

            var contract = team.SignDriver(driver, season);

            Assert.AreEqual(1, team.Drivers.Count());
            Assert.IsNotNull(contract);
            Assert.AreEqual(team, contract.Team);
        }