public void SeizeRoleOwnership_NoContext_ThrowsNullReferenceException() { var controller = new SubController(); Assert.Throws <NullReferenceException>(() => controller.SeizeRoleOwnership(ActiveDirectoryRole.InfrastructureRole)); Assert.Throws <NullReferenceException>(() => controller.SeizeRoleOwnership(ActiveDirectoryRole.NamingRole)); Assert.Throws <NullReferenceException>(() => controller.SeizeRoleOwnership(ActiveDirectoryRole.PdcRole)); Assert.Throws <NullReferenceException>(() => controller.SeizeRoleOwnership(ActiveDirectoryRole.RidRole)); Assert.Throws <NullReferenceException>(() => controller.SeizeRoleOwnership(ActiveDirectoryRole.SchemaRole)); }
public void SeizeRoleOwnership_InvalidRole_ThrowsInvalidEnumArgumentException(ActiveDirectoryRole role) { var controller = new SubController(); AssertExtensions.Throws <InvalidEnumArgumentException>("role", () => controller.SeizeRoleOwnership(role)); }