public void Setup() { _parser = Substitute.For <ICommandParser>(); _discordClient = Substitute.For <IDiscordClient>(); _dataStore = Substitute.For <IDataStore>(); _client = new DiscloseClient(_discordClient, _parser, _dataStore); }
public void Setup() { _parser = Substitute.For <ICommandParser>(); _discordClient = Substitute.For <IDiscordClient>(); _discloseClient = new DiscloseClient(_discordClient, _parser); _discloseClient.Init(new DiscloseOptions()); _message = Substitute.For <IMessage>(); _server = Substitute.For <IServer>(); IServerUser serverUser = Substitute.For <IServerUser>(); serverUser.Id.Returns((ulong)123); _message.User.Returns(serverUser); _server.Id.Returns((ulong)1); _discordClient.OnServerAvailable += Raise.EventWith(new object(), new ServerEventArgs(_server)); }
public void Setup() { _parser = Substitute.For <ICommandParser>(); _discordClient = Substitute.For <IDiscordClient>(); _discloseClient = new DiscloseClient(_discordClient, _parser); _discloseClient.Init(new DiscloseOptions()); _user = Substitute.For <IServerUser>(); _server = Substitute.For <IServer>(); _user.Id.Returns((ulong)1); _server.Id.Returns((ulong)2); _handler1 = Substitute.For <IUserJoinsServerHandler>(); _handler2 = Substitute.For <IUserJoinsServerHandler>(); _discloseClient.Register(_handler1); _discloseClient.Register(_handler2); _discordClient.OnServerAvailable += Raise.EventWith <ServerEventArgs>(new object(), new ServerEventArgs(_server)); }