// Path: netsecurity/src/main/java/com/commonsware/cwac/netsecurity/DomainMatchRule.java
// public static DomainMatchRule allOf(DomainMatchRule... rules) {
//   return(new Composite(false, rules));
// }
// 
// Path: netsecurity/src/main/java/com/commonsware/cwac/netsecurity/DomainMatchRule.java
// public static DomainMatchRule anyOf(DomainMatchRule... rules) {
//   return(new Composite(true, rules));
// }
// 
// Path: netsecurity/src/main/java/com/commonsware/cwac/netsecurity/DomainMatchRule.java
// public static DomainMatchRule blacklist(String... globs) {
//   List<DomainMatchRule> rules=new ArrayList<>();
// 
//   for (String glob : globs) {
//     rules.add(not(is(glob)));
//   }
// 
//   return(allOf(rules));
// }
// 
// Path: netsecurity/src/main/java/com/commonsware/cwac/netsecurity/DomainMatchRule.java
// public static DomainMatchRule is(Pattern pattern) {
//   return(new Regex(pattern));
// }
// 
// Path: netsecurity/src/main/java/com/commonsware/cwac/netsecurity/DomainMatchRule.java
// public static DomainMatchRule not(DomainMatchRule rule) {
//   return(new Not(rule));
// }
// 
// Path: netsecurity/src/main/java/com/commonsware/cwac/netsecurity/DomainMatchRule.java
// public static DomainMatchRule whitelist(String... globs) {
//   List<DomainMatchRule> rules=new ArrayList<>();
// 
//   for (String glob : globs) {
//     rules.add(is(glob));
//   }
// 
//   return(anyOf(rules));
// }


import org.junit.Test;
import java.util.regex.Pattern;
import static com.commonsware.cwac.netsecurity.DomainMatchRule.allOf;
import static com.commonsware.cwac.netsecurity.DomainMatchRule.anyOf;
import static com.commonsware.cwac.netsecurity.DomainMatchRule.blacklist;
import static com.commonsware.cwac.netsecurity.DomainMatchRule.is;
import static com.commonsware.cwac.netsecurity.DomainMatchRule.not;
import static com.commonsware.cwac.netsecurity.DomainMatchRule.whitelist;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
/***
 Copyright (c) 2017 CommonsWare, LLC

 Licensed under the Apache License, Version 2.0 (the "License"); you may
 not use this file except in compliance with the License. You may obtain
 a copy of the License at
 http://www.apache.org/licenses/LICENSE-2.0
 Unless required by applicable law or agreed to in writing, software
 distributed under the License _is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */

package com.commonsware.cwac.netsecurity.test;


public class DomainMatchRuleTests {
  @Test
  public void _is() {
// Path: netsecurity/src/main/java/com/commonsware/cwac/netsecurity/DomainMatchRule.java
// public static DomainMatchRule allOf(DomainMatchRule... rules) {
//   return(new Composite(false, rules));
// }
// 
// Path: netsecurity/src/main/java/com/commonsware/cwac/netsecurity/DomainMatchRule.java
// public static DomainMatchRule anyOf(DomainMatchRule... rules) {
//   return(new Composite(true, rules));
// }
// 
// Path: netsecurity/src/main/java/com/commonsware/cwac/netsecurity/DomainMatchRule.java
// public static DomainMatchRule blacklist(String... globs) {
//   List<DomainMatchRule> rules=new ArrayList<>();
// 
//   for (String glob : globs) {
//     rules.add(not(is(glob)));
//   }
// 
//   return(allOf(rules));
// }
// 
// Path: netsecurity/src/main/java/com/commonsware/cwac/netsecurity/DomainMatchRule.java
// public static DomainMatchRule is(Pattern pattern) {
//   return(new Regex(pattern));
// }
// 
// Path: netsecurity/src/main/java/com/commonsware/cwac/netsecurity/DomainMatchRule.java
// public static DomainMatchRule not(DomainMatchRule rule) {
//   return(new Not(rule));
// }
// 
// Path: netsecurity/src/main/java/com/commonsware/cwac/netsecurity/DomainMatchRule.java
// public static DomainMatchRule whitelist(String... globs) {
//   List<DomainMatchRule> rules=new ArrayList<>();
// 
//   for (String glob : globs) {
//     rules.add(is(glob));
//   }
// 
//   return(anyOf(rules));
// }


// Path: netsecurity/src/test/java/com/commonsware/cwac/netsecurity/test/DomainMatchRuleTests.java
import org.junit.Test;
import java.util.regex.Pattern;
import static com.commonsware.cwac.netsecurity.DomainMatchRule.allOf;
import static com.commonsware.cwac.netsecurity.DomainMatchRule.anyOf;
import static com.commonsware.cwac.netsecurity.DomainMatchRule.blacklist;
import static com.commonsware.cwac.netsecurity.DomainMatchRule.is;
import static com.commonsware.cwac.netsecurity.DomainMatchRule.not;
import static com.commonsware.cwac.netsecurity.DomainMatchRule.whitelist;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

/***
 Copyright (c) 2017 CommonsWare, LLC

 Licensed under the Apache License, Version 2.0 (the "License"); you may
 not use this file except in compliance with the License. You may obtain
 a copy of the License at
 http://www.apache.org/licenses/LICENSE-2.0
 Unless required by applicable law or agreed to in writing, software
 distributed under the License _is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */

package com.commonsware.cwac.netsecurity.test;


public class DomainMatchRuleTests {
  @Test
  public void _is() {
    assertTrue(is("foo.com").matches("foo.com"));