コード例 #1
0
// TestRootFacade
func TestRootFacade(t *testing.T) {
	assert := assert.New(t)

	ctx := foundationtest.NewContext()
	facade := NewRootFacade(ctx)
	assert.NotNil(facade.GetContext())
}
コード例 #2
0
// TestRootService
func TestRootService(t *testing.T) {
	assert := assert.New(t)

	ctx := foundationtest.NewContext()
	service := NewRootService(ctx)
	assert.NotNil(service.GetContext())
}
コード例 #3
0
// TestAccessor
func TestAccessor(t *testing.T) {
	assert := assert.New(t)

	var ctx foundation.Context
	ctx = foundationtest.NewContext()

	var action string
	action = GetAction(ctx)
	assert.Equal("", action)
	SetAction(ctx, "foo.Bar()")
	action = GetAction(ctx)
	assert.Equal("foo.Bar()", action)
}