Exemplo n.º 1
0
    public void SetPrefix()
    {
        var mock = new Mock <IGuildData>(MockBehavior.Strict);

        mock.Setup(x => x.SetPrefix(1, '-'));
        var guildService = new GuildService(mock.Object);

        guildService.SetPrefix(1, '-');

        mock.Verify(x => x.SetPrefix(1, '-'), Times.Exactly(1));
    }
Exemplo n.º 2
0
 public ActionResult SetPrefix(ulong guildId, [FromBody] Prefix prefix)
 {
     _guildService.SetPrefix(guildId, prefix.prefix);
     return(Ok($"Prefix set to {prefix.prefix}"));
 }