public void New_NameOnly_AssignsPropertyValuesCorrectly() { // Arrange / Act var sut = new CommandNameAttribute("command/name"); // Assert Assert.Equal("command/name", sut.Name); }
public void Name_NotModified_TestMethod() { string expected = @"Sell-Cow-Command"; string actual = @"Not set"; CommandNameAttribute attrTest = new CommandNameAttribute(expected); actual = attrTest.GetDefaultFunctionName().Name; Assert.AreEqual(expected, actual); }
public CommandDefinition(string commandDefinitionName, string durableFunctionName = @"") { _commandDefinitionName = commandDefinitionName; if (!string.IsNullOrWhiteSpace(durableFunctionName)) { _durableFunctionName = durableFunctionName; } else { // default to the standard default command name _durableFunctionName = CommandNameAttribute.MakeCommandFunctionName(commandDefinitionName); } }
internal CommandInfo(Type commandType, CommandNameAttribute nameAttribute, CommandDescriptionAttribute descriptionAttribute = null) { if (commandType == null) { throw new ArgumentNullException("commandType"); } CommandType = commandType; Name = nameAttribute.Name; Description = descriptionAttribute != null ? descriptionAttribute.Description : String.Empty; }
public void Constructor_TestMethod() { CommandNameAttribute attrTest = new CommandNameAttribute(@"Sell-Cow"); Assert.IsNotNull(attrTest); }