public void Invalid_if_no_arguments() { //IE, this is there we would show help var result = ProcessModeHandler.GetMode(new Dictionary <string, string>()); Assert.That(result, Is.EqualTo(CmdMode.Invalid)); }
public void Update_Mode_Given_Path() { var options = new Dictionary <string, string>() { { UtilCliOptions.DEFAULT, "TestDtos" + Path.DirectorySeparatorChar + "ServiceStackRef.dtos.cs" } }; var result = ProcessModeHandler.GetMode(options); Assert.That(result, Is.EqualTo(CmdMode.UpdateReference)); }
public void Add_Reference_Mode_Given_Just_Url() { var options = new Dictionary <string, string>() { { UtilCliOptions.DEFAULT, "http://techstacks.io/" } }; var result = ProcessModeHandler.GetMode(options); Assert.That(result, Is.EqualTo(CmdMode.AddReference)); }
public void Add_Reference_Mode_Given_Url_And_Language() { var options = new Dictionary <string, string>() { { UtilCliOptions.DEFAULT, "http://techstacks.io/" }, { UtilCliOptions.LANG, "FSharp" } }; var result = ProcessModeHandler.GetMode(options); Assert.That(result, Is.EqualTo(CmdMode.AddRefWithLang)); }
public void Add_Reference_Mode_Given_Url_And_Path() { var options = new Dictionary <string, string>() { { UtilCliOptions.DEFAULT, "http://techstacks.io/" }, { UtilCliOptions.FILE, "myfile.dto.cs" } }; var result = ProcessModeHandler.GetMode(options); Assert.That(result, Is.EqualTo(CmdMode.AddReferenceWithPath)); }
public void GetMode_Throws_With_No_Args() { bool result = false; try { ProcessModeHandler.GetMode(null); } catch (Exception) { result = true; } Assert.That(result); }