Пример #1
0
        public void InitializeWithNullRecordThrows()
        {
            // Arrange & Act
            ScopeType scope = new ScopeType();

            // Assert
            Assert.Throws <ArgumentNullException>("record", () => scope.Initialize(record: null));
        }
Пример #2
0
        public void InitializeWithScopeTypeRecordSuccess()
        {
            // Arrange
            IEdmRecordExpression record = new EdmRecordExpression(
                new EdmPropertyConstructor("Scope", new EdmStringConstant("name")),
                new EdmPropertyConstructor("RestrictedProperties", new EdmStringConstant("abc,xyz")));

            // Act
            ScopeType scope = new ScopeType();

            scope.Initialize(record);

            // Assert
            Assert.NotNull(scope.Scope);
            Assert.Equal("name", scope.Scope);

            Assert.NotNull(scope.RestrictedProperties);
            Assert.Equal("abc,xyz", scope.RestrictedProperties);
        }