public void Constructor_should_rethrow_any_exception_if_an_exception_is_thrown_internally() { using (new IndirectionsContext()) { // Arrange PList <RicePaddy> . ExcludeGeneric(). IncludeAddT(). DefaultBehavior = IndirectionBehaviors.NotImplemented; // Act, Assert ExceptionAssert.Throws <NotImplementedException>(() => new Village()); } }
public void Constructor_should_not_initialize_member_Roads_if_default_value_is_returned_internally() { using (new IndirectionsContext()) { // Arrange PList <FarmRoad> . ExcludeGeneric(). IncludeAddT(). DefaultBehavior = IndirectionBehaviors.DefaultValue; // Act var vil = new Village(); // Assert CollectionAssert.IsEmpty(vil.Roads); } }
public void Constructor_should_initialize_members_indeterminately_if_original_behavior_is_performed_internally() { using (new IndirectionsContext()) { // Arrange PList <RicePaddy> . ExcludeGeneric(). IncludeAddT(). DefaultBehavior = IndirectionBehaviors.Fallthrough; PList <FarmRoad> . ExcludeGeneric(). IncludeAddT(). DefaultBehavior = IndirectionBehaviors.Fallthrough; // Act, Assert ExceptionAssert.DoesNotThrow(() => new Village()); } }