Exemplo n.º 1
0
        public async Task RunMajorUseCasesWithDummyUser()
        {
            var config = new FConfig()
            {
                TcpPort = 0
            };
            var dummyUsers = new DummyUsers();

            var             fserver = new FServer(Logger.Null, config, dummyUsers);
            IUserManagement users   = fserver;

            await users.Create(_goga);

            await users.Update(_goga);

            var all = await users.List();

            Assert.That(all, Is.Not.Empty);

            var fclient = await FClient.New(config, new ClientInfo {
                ServerName = fserver.ServerName,
                Port       = fserver.Port,
                UserName   = "******",
                Password   = "******"
            });

            await fclient.Upload("f-config.goga.json", "f-config.json");

            await fclient.Upload("NUnit3.TestAdapter.dll.goga", "NUnit3.TestAdapter.dll");

            await fclient.Download("f-config.goga.json", "f-config.copy.json");

            await fclient.Download("NUnit3.TestAdapter.dll.goga", "NUnit3.TestAdapter.dll.copy");

            var list = await fclient.ListFiles();

            Assert.That(list, Is.Not.Empty);

            await fclient.Delete("f-config.goga.json");

            await users.Delete(_goga, false);
        }