// Path: src/main/java/com/morcinek/android/codegenerator/extractor/model/ResourceId.java
// public class ResourceId {
// 
//     private String name;
// 
//     private String namespace;
// 
//     public ResourceId(String name) {
//         this.name = name;
//     }
// 
//     public ResourceId(String name, String namespace) {
//         this.name = name;
//         this.namespace = namespace;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public String getNamespace() {
//         return namespace;
//     }
// }


import com.morcinek.android.codegenerator.extractor.model.ResourceId;
import org.fest.assertions.Assertions;
import org.junit.Before;
import org.junit.Test;
package com.morcinek.android.codegenerator.extractor.string;


/**
 * Copyright 2014 Tomasz Morcinek. All rights reserved.
 */
public class ResourceIdExtractorTest {

    private ResourceIdExtractor resourceIdExtractor;

    @Before
    public void setUp() throws Exception {
        resourceIdExtractor = new ResourceIdExtractor();
    }

    @Test
    public void simpleIdTest() throws Exception {
        ResourceId resourceId = resourceIdExtractor.extractFromString("@+id/list");
        Assertions.assertThat(resourceId.getName()).isEqualTo("list");
        Assertions.assertThat(resourceId.getNamespace()).isNull();
    }

    @Test
    public void simpleIdTest2() throws Exception {
// Path: src/main/java/com/morcinek/android/codegenerator/extractor/model/ResourceId.java
// public class ResourceId {
// 
//     private String name;
// 
//     private String namespace;
// 
//     public ResourceId(String name) {
//         this.name = name;
//     }
// 
//     public ResourceId(String name, String namespace) {
//         this.name = name;
//         this.namespace = namespace;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public String getNamespace() {
//         return namespace;
//     }
// }


// Path: src/test/java/com/morcinek/android/codegenerator/extractor/string/ResourceIdExtractorTest.java
import com.morcinek.android.codegenerator.extractor.model.ResourceId;
import org.fest.assertions.Assertions;
import org.junit.Before;
import org.junit.Test;

package com.morcinek.android.codegenerator.extractor.string;


/**
 * Copyright 2014 Tomasz Morcinek. All rights reserved.
 */
public class ResourceIdExtractorTest {

    private ResourceIdExtractor resourceIdExtractor;

    @Before
    public void setUp() throws Exception {
        resourceIdExtractor = new ResourceIdExtractor();
    }

    @Test
    public void simpleIdTest() throws Exception {
        ResourceId resourceId = resourceIdExtractor.extractFromString("@+id/list");
        Assertions.assertThat(resourceId.getName()).isEqualTo("list");
        Assertions.assertThat(resourceId.getNamespace()).isNull();
    }

    @Test
    public void simpleIdTest2() throws Exception {
        ResourceId resourceId = resourceIdExtractor.extractFromString("@+id/this_is_resource");