예제 #1
0
        public void EdmSingletonBasicAttributeTest()
        {
            EdmSingleton singleton = new EdmSingleton(this.entityContainer, "VIP", customerType);

            Assert.Same(this.entityContainer, singleton.Container);
            Assert.Equal(EdmContainerElementKind.Singleton, singleton.ContainerElementKind);
            Assert.Same(customerType, singleton.EntityType());
        }
예제 #2
0
        public void EdmSingletonBasicAttributeTest()
        {
            EdmSingleton singleton = new EdmSingleton(this.entityContainer, "VIP", customerType);

            singleton.Container.Should().Be(this.entityContainer);
            singleton.ContainerElementKind.Should().Be(EdmContainerElementKind.Singleton);
            singleton.EntityType().Should().Be(customerType);
        }
예제 #3
0
        public void TestEntityType()
        {
            var container  = new EdmEntityContainer("NS", "C");
            var entityType = new EdmEntityType("NS", "People");
            var entitySet  = new EdmEntitySet(container, "Peoples", entityType);

            Assert.AreEqual(entityType, entitySet.EntityType());
            var singleton = new EdmSingleton(container, "Boss", entityType);

            Assert.AreEqual(entityType, singleton.EntityType());
        }