public void Multiple_flags_Should_Set_ManyCategoryLabels() { var op = new OptionsParser(new List<string> {"-h", "-t", "-b"}); Assert.True(op.Tags.Contains("Hus")); Assert.True(op.Tags.Contains("Business")); Assert.True(op.Tags.Contains("Travel")); }
public void Importance_Lp_ShouldBeParsedAsLowImportance() { var op = new OptionsParser(new List<string> {"-lp"}); Assert.Equal(TaskPriority.Low, op.Importance); }
public void Importance_Hp_ShouldBeParsedAsHighImportance() { var op = new OptionsParser(new List<string> {"-hp"}); Assert.Equal(TaskPriority.High, op.Importance); }
public void I_flag_Should_Set_Info_CategoryLabel() { var op = new OptionsParser(new List<string> {"-i"}); Assert.True(op.Tags.Contains("Info")); }
public void WeFlag_ShouldReturn_ComingMonday() { DateTime dateOfExecuting = DateTime.Parse("2012-11-16"); var optionsParser = new OptionsParser(new List<string> {"-we"}, dateOfExecuting); Assert.Equal(DateTime.Parse("2012-11-21"), optionsParser.DueDate); }
public void Feb_InBeginning_Should_Return_FirstDayInFebruary() { DateTime dateOfExecuting = DateTime.Parse("2012-11-16"); var optionsParser = new OptionsParser(new List<string> {"-feb"}, dateOfExecuting); Assert.Equal(DateTime.Parse("2013-02-01"), optionsParser.DueDate); }
public void W_flag_Should_Set_Business_CategoryLabel() { var op = new OptionsParser(new List<string> {"-w"}); Assert.True(op.Tags.Contains("Business")); }
public void P_flag_Should_Set_Personal_CategoryLabel() { var op = new OptionsParser(new List<string> {"-p"}); Assert.True(op.Tags.Contains("Personal")); }
public void TmFlag_shouldRetrun_TomorrowsDate() { var optionsParser = new OptionsParser(new List<string> {"-tm"}); Assert.Equal(DateTime.Today.AddDays(1), optionsParser.DueDate); }
public void H_flag_Should_Set_House_CategoryLabel() { var op = new OptionsParser(new List<string> {"-h"}); Assert.True(op.Tags.Contains("Hus")); }
public void SwedishStyleDate20121015_ShouldParseToOctober15th2012() { var op = new OptionsParser(new List<string> {"-d2012-10-15"}); Assert.Equal(DateTime.Parse("2012-10-15"), op.DueDate); }
public void Sep_InBeginning_Should_Return_FirstDayInSeptember() { DateTime dateOfExecuting = DateTime.Parse("2012-11-16"); var optionsParser = new OptionsParser(new List<string> {"-sep"}, dateOfExecuting); Assert.Equal(DateTime.Parse("2013-09-01"), optionsParser.DueDate); }
public void F_flag_Should_Set_Family_CategoryLabel() { var op = new OptionsParser(new List<string> {"-f"}); Assert.True(op.Tags.Contains("Family")); }
public void Maj_InSwedish_InBeginning_Should_Return_FirstDayInMay() { DateTime dateOfExecuting = DateTime.Parse("2012-11-16"); var optionsParser = new OptionsParser(new List<string> {"-maj"}, dateOfExecuting); Assert.Equal(DateTime.Parse("2013-05-01"), optionsParser.DueDate); }
public void Importance_Nothing_ShouldBeParsedAsNormalImportance() { var op = new OptionsParser(new List<string> {""}); Assert.Equal(TaskPriority.Normal, op.Importance); }
public void TodayFlag_ShouldReturn_TodaysDate() { var optionsParser = new OptionsParser(new List<string> {"-td"}); Assert.Equal(DateTime.Today, optionsParser.DueDate); }
public void TwFlag_ShoudReturn_LastDayOfWeek_SE() { DateTime dateOfExecuting = DateTime.Parse("2012-11-16"); var optionsParser = new OptionsParser(new List<string> {"-tw"}, dateOfExecuting); DateTime expectedLastDayOfWeek = DateTime.Parse("2012-11-18"); Assert.Equal(expectedLastDayOfWeek, optionsParser.DueDate); }
public void T_flag_Should_Set_Travel_CategoryLabel() { var op = new OptionsParser(new List<string> {"-t"}); Assert.True(op.Tags.Contains("Travel")); }
public void UsStyleDate151012_ShouldParseToOctober15th2012() { var op = new OptionsParser(new List<string> {"-d10/15/2012"}); Assert.Equal(DateTime.Parse("2012-10-15"), op.DueDate); }
public void Aug_InBeginning_Should_Return_FirstDayInAugust() { DateTime dateOfExecuting = DateTime.Parse("2012-11-16"); var optionsParser = new OptionsParser(new List<string> {"-aug"}, dateOfExecuting); Assert.Equal(DateTime.Parse("2013-08-01"), optionsParser.DueDate); }
public void Dec_InBeginning_Should_Return_FirstDayInOctober() { DateTime dateOfExecuting = DateTime.Parse("2012-11-16"); var optionsParser = new OptionsParser(new List<string> {"-dec"}, dateOfExecuting); Assert.Equal(DateTime.Parse("2012-12-01"), optionsParser.DueDate); }