public void In_Use_With_Description_Does_Request() { var bundle = new TestBundle { RequriesBackgroundLocation = false, InUseLocationReason = "reason" }; var manager = new VerfyAuthorizeLocationManager(); manager.RequestAuthorization(bundle); Assert.Equal(CLAuthorizationStatus.AuthorizedWhenInUse, manager.RequestedStatus); }
public void Background_With_Description_Does_Not_Throw() { var bundle = new TestBundle { RequriesBackgroundLocation = true, BackgroundLocationReason = "reason" }; var manager = new VerfyAuthorizeLocationManager(); manager.RequestAuthorization(bundle); Assert.Equal(CLAuthorizationStatus.AuthorizedAlways, manager.RequestedStatus); }
public void In_Use_With_No_Description_Throws() { var bundle = new TestBundle { RequriesBackgroundLocation = false }; var manager = new VerfyAuthorizeLocationManager(); Assert.Throws<InvalidOperationException>(() => manager.RequestAuthorization(bundle) ); Assert.Equal(CLAuthorizationStatus.NotDetermined, manager.RequestedStatus); }
public void In_Use_With_No_Description_Throws() { var bundle = new TestBundle { RequriesBackgroundLocation = false }; var manager = new VerfyAuthorizeLocationManager(); Assert.Throws <InvalidOperationException>(() => manager.RequestAuthorization(bundle) ); Assert.Equal(CLAuthorizationStatus.NotDetermined, manager.RequestedStatus); }