Ejemplo n.º 1
0
 public async void DeletePhone()
 {
     var apiSettings = new FakeApiSettings();
     var facade = new ApiFacade(new ApiExecuter(apiSettings), apiSettings);
     var result = await facade.DeletePhone(new Device() { Guid = "c1489e16-235f-4c45-a082-706d33360021" });
     Assert.IsNull(result);
 }
Ejemplo n.º 2
0
 public async void GetAllBorrowsByDeviceId()
 {
     var apiSettings = new FakeApiSettings();
     var facade = new ApiFacade(new ApiExecuter(apiSettings), apiSettings);
     var result = await facade.GetBorrows("331f65f6-fbc6-40bc-b16f-35b49840441b");
     Assert.IsNotNull(result);
 }
Ejemplo n.º 3
0
 public async void RegisterAndUnregisterPhone()
 {
     var apiSettings = new FakeApiSettings();
     var facade = new ApiFacade(new ApiExecuter(apiSettings), apiSettings);
     var result = await facade.RegisterPhone(new Device() { ImageUrl = "", Name = "Создано тестом", Platform = "test", Guid = "c1489e16-235f-4c45-a082-706d33360021" });
     DeletePhone();
 }
Ejemplo n.º 4
0
 public async void GetUsers()
 {
     var apiSettings = new FakeApiSettings();
     var facade = new ApiFacade(new ApiExecuter(apiSettings), apiSettings);
     var result = await facade.GetUsers();
     Assert.Greater(result.Count, 0);
 }
Ejemplo n.º 5
0
 public async void GetPhones()
 {
     var apiSettings = new FakeApiSettings();
     var facade = new ApiFacade(new ApiExecuter(apiSettings), apiSettings);
     var result = await facade.TryAuth("+79166728879");
     Assert.IsFalse(result.IsRegistered);
 }
Ejemplo n.º 6
0
        public async void GetPhoneWhichNotExist()
        {
            var apiSettings = new FakeApiSettings();
            var facade = new ApiFacade(new ApiExecuter(apiSettings), apiSettings);

            var result = await facade.GetPhone("teasattat");
            Assert.IsNull(result);
        }
Ejemplo n.º 7
0
        public async void GetPhones()
        {
            var apiSettings = new FakeApiSettings();
            var facade      = new ApiFacade(new ApiExecuter(apiSettings), apiSettings);
            var result      = await facade.TryAuth("+79166728879");

            Assert.IsFalse(result.IsRegistered);
        }