Beispiel #1
0
        public void GetVersionNullTest()
        {
            DummyAdbCommandLineClient commandLine = new DummyAdbCommandLineClient();

            commandLine.Version = null;
            Assert.Throws <AdbException>(() => commandLine.GetVersion());
        }
Beispiel #2
0
        public void GetVersionNullTest()
        {
            DummyAdbCommandLineClient commandLine = new DummyAdbCommandLineClient();

            commandLine.Version = null;
            commandLine.GetVersion();
        }
Beispiel #3
0
        public void StartServerTest()
        {
            DummyAdbCommandLineClient commandLine = new DummyAdbCommandLineClient();

            Assert.False(commandLine.ServerStarted);
            commandLine.StartServer();
            Assert.True(commandLine.ServerStarted);
        }
Beispiel #4
0
        public void GetOutdatedVersionTest()
        {
            DummyAdbCommandLineClient commandLine = new DummyAdbCommandLineClient();

            commandLine.Version = new Version(1, 0, 1);

            Assert.Throws <AdbException>(() => commandLine.GetVersion());
        }
Beispiel #5
0
        public void GetVersionTest()
        {
            DummyAdbCommandLineClient commandLine = new DummyAdbCommandLineClient();

            commandLine.Version = new Version(1, 0, 32);

            Assert.Equal(new Version(1, 0, 32), commandLine.GetVersion());
        }
Beispiel #6
0
        public void GetOutdatedVersionTest()
        {
            DummyAdbCommandLineClient commandLine = new DummyAdbCommandLineClient();

            commandLine.Version = new Version(1, 0, 1);

            commandLine.GetVersion();
        }
Beispiel #7
0
        public void Initialize()
        {
            Factories.Reset();

            this.socket = new DummyAdbSocket();
            Factories.AdbSocketFactory = (endPoint) => this.socket;

            this.commandLineClient = new DummyAdbCommandLineClient();
            Factories.AdbCommandLineClientFactory = (version) => this.commandLineClient;
        }
Beispiel #8
0
        public void Initialize()
        {
            this.socket           = new DummyAdbSocket();
            this.adbSocketFactory = (endPoint) => this.socket;

            this.commandLineClient           = new DummyAdbCommandLineClient();
            this.adbCommandLineClientFactory = (version) => this.commandLineClient;

            this.adbClient = new AdbClient(AdbClient.DefaultEndPoint, this.adbSocketFactory);
            this.adbServer = new AdbServer(this.adbClient, this.adbCommandLineClientFactory);
        }