public void InitializeWithNullRecordThrows() { // Arrange & Act ScopeType scope = new ScopeType(); // Assert Assert.Throws <ArgumentNullException>("record", () => scope.Initialize(record: null)); }
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); }