Qiita C# Advent Calendar 2014 16æ¥ç®ã®ã¨ã³ããªã¼ã«ãªãã¾ãã ã©ãããåã§ããã¯ã¯ã¯ã¯ããã³ã¼ãæ¸ãã¦ã¾ããï¼ NUnitã®ãã¹ãããªã¼ã«ã°ãªã¼ã³ã«ãªãç¬éã£ã¦ã¯ã¯ã¯ã¯ãã¾ãããã ã¨ãããã¨ã§ãNUnitã®TestCaseã®ä½ãæ¹ã«ã¤ãã¦ã é©å½ãªãã¹ãã®ã¿ã¼ã²ããã¨ãã¦ã以ä¸ã®ãããªTimeCheckerã¯ã©ã¹ã® IsValidTimeã¡ã½ãããæ³å®ãã¦ããã¾ãã ãã åã«æéã0-23ã®ç¯å²ã§åã0-59ã®éã§ãããã¨ã確èªããã ãã®ãã®ã public class TimeChecker { public bool IsValidTime(int hour, int minute) { return 0 <= hour && hour <= 23 && 0 <= minute && minute <= 59; } } ãã¼ã·ãã¯ãªãã¹ãã®æ¸ãæ¹ããã
{{#tags}}- {{label}}
{{/tags}}