Skip to content

Commit

Permalink
Declare test cases for static API and add a few implementations
Browse files Browse the repository at this point in the history
  • Loading branch information
felippeduran committed Aug 24, 2021
1 parent 1b4fac7 commit 38bdcff
Show file tree
Hide file tree
Showing 3 changed files with 462 additions and 0 deletions.
33 changes: 33 additions & 0 deletions session/static_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package session

import "testing"

func TestStaticGetSessionByUID(t *testing.T) {
// GetSessionByUID(uid string) Session
// TODO(static): implement test
}

func TestStaticGetSessionByID(t *testing.T) {
// GetSessionByID(id int64) Session
// TODO(static): implement test
}

func TestStaticOnSessionBind(t *testing.T) {
// OnSessionBind(f func(ctx context.Context, s Session) error)
// TODO(static): implement test
}

func TestStaticOnAfterSessionBind(t *testing.T) {
// OnAfterSessionBind(f func(ctx context.Context, s Session) error)
// TODO(static): implement test
}

func TestStaticOnSessionClose(t *testing.T) {
// OnSessionClose(f func(s Session))
// TODO(static): implement test
}

func TestStaticCloseAll(t *testing.T) {
// CloseAll()
// TODO(static): implement test
}
20 changes: 20 additions & 0 deletions static.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
// Copyright (c) TFG Co. All Rights Reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.

package pitaya

import (
Expand Down
Loading

0 comments on commit 38bdcff

Please sign in to comment.