public void Should_Convert_Method_Names()
 {
     Assert.Equal("GetContactsById", NetNamingMapper.GetMethodName("get-/contacts/{id}"));
 }
 public void Should_Avoid_Parentheses_In_Method_Name()
 {
     Assert.Equal("GetSalesById", NetNamingMapper.GetMethodName("get-/sales({id})"));
     Assert.Equal("GetSalesId", NetNamingMapper.GetMethodName("get-/sales(id)"));
 }
Пример #3
0
 public void Should_Avoid_Single_Quote_In_Method_Name()
 {
     Assert.AreEqual("GetSalesById", NetNamingMapper.GetMethodName("get-/sales('{id}')"));
     Assert.AreEqual("GetSalesId", NetNamingMapper.GetMethodName("get-/sales'id'"));
 }