public void TestHasGoals() { Assert.IsNull(configuration.GoalsDelegate); configuration.HasGoals(x => x.Goals); Assert.IsNotNull(configuration.GoalsDelegate); var instance = new TestDocument(); instance.Themes = new string[] { "value1", "value2" }; Assert.IsTrue(Object.ReferenceEquals(instance.Goals, configuration.GoalsDelegate(instance))); }