pulumi/pkg/resource/urn_test.go
joeduffy 35aa6b7559 Rename pulumi/lumi to pulumi/pulumi-fabric
We are renaming Lumi to Pulumi Fabric.  This change simply renames the
pulumi/lumi repo to pulumi/pulumi-fabric, without the CLI tools and other
changes that will follow soon afterwards.
2017-08-02 09:25:22 -07:00

24 lines
587 B
Go

// Copyright 2016-2017, Pulumi Corporation. All rights reserved.
package resource
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/pulumi/pulumi-fabric/pkg/tokens"
)
func TestURNRoundTripping(t *testing.T) {
ns := tokens.QName("namespace")
alloc := tokens.Module("foo:bar/baz")
typ := tokens.Type("bang:boom/fizzle:MajorResource")
name := tokens.QName("a-swell-resource")
urn := NewURN(ns, alloc, typ, name)
assert.Equal(t, ns, urn.Namespace())
assert.Equal(t, alloc, urn.Alloc())
assert.Equal(t, typ, urn.Type())
assert.Equal(t, name, urn.Name())
}