--- /dev/null
+package configuremgr_test
+
+import (
+ "testing"
+ "time"
+ "os/exec"
+ "fmt"
+
+ configuremgr "configuremgr"
+ mockconfiguremgr "configuremgr/mock"
+)
+
+
+func TestBasicMockConfigureMgr(t *testing.T){
+
+ //copy event environment
+ watchDir := "/tmp/foo"
+ src := "./mock/mysum"
+ dst := watchDir
+
+
+ //linking interface
+ //mock function
+
+ //test object
+ configuremgrObj := new(configuremgr.ConfigureMgr)
+ configuremgrObj.IDeviceDiscoveryMgr.PushConfPath = mockconfiguremgr.PushConfPathDiscoveryDeviceMock
+ configuremgrObj.IAppExecuteMgr.PushConfPath = mockconfiguremgr.PushConfPathAppExecuteMock
+ configuremgrObj.IScoringMgr.PushLibPath = mockconfiguremgr.PushLibPathScoringAppMock
+ configuremgrObj.Done = make(chan bool)
+
+ go configuremgrObj.Watch(watchDir)
+
+ //TODO : push /tmp/foo/simple directory using Cmd package
+ time.Sleep(time.Duration(1 * time.Second))
+
+ command := fmt.Sprintf("cp -r %s %s", src, dst)
+ configuremgr.DLog.Println(command)
+
+ cmd := exec.Command("sh", "-c", command)
+ stdoutStderr, err := cmd.CombinedOutput()
+ configuremgr.DLog.Printf("%s", stdoutStderr)
+ if err != nil {
+ configuremgr.ELog.Fatal(err)
+ }
+
+ configuremgrObj.Done <- true
+}
\ No newline at end of file