コード例 #1
0
ファイル: ThrowResult.cs プロジェクト: xoposhiy/design-course
		public ThrowResult(int section, SectionArea sectionArea)
		{
			if (section < 0 || section > 20 && section != 25)
				throw new ArgumentException("Section should be in [0..20, 25] but was " + section);
			Section = section;
			SectionArea = sectionArea;
		}
コード例 #2
0
ファイル: ThrowResult.cs プロジェクト: urfu-code/Darts
 public ThrowResult(int section, SectionArea sectionArea)
 {
     if (section < 0 || section > 20 && section != 25)
     {
         throw new ArgumentException("Section should be in [0..20, 25] but was " + section);
     }
     Section     = section;
     SectionArea = sectionArea;
 }
コード例 #3
0
		public void Parse(string input, int expectedSector, SectionArea expedtedMultiplier)
		{
			var t = ThrowResult.Parse(input);
			Assert.AreEqual(new ThrowResult(expectedSector, expedtedMultiplier), t);
		}
コード例 #4
0
ファイル: ThrowResult_should.cs プロジェクト: urfu-code/Darts
        public void Parse(string input, int expectedSector, SectionArea expedtedMultiplier)
        {
            var t = ThrowResult.Parse(input);

            Assert.AreEqual(new ThrowResult(expectedSector, expedtedMultiplier), t);
        }