Пример #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)
}