Example #1
0
        public async Task Once_InvalidToken_ShouldThrowCouldNotParseAuthTokenException()
        {
            // Arrange
            FirebaseDatabase UnauthenticatedDatabase = new FirebaseDatabase(DatabaseUrl, () => Task.FromResult("2K7qdbC2X9nQNRzlqQC14XmsGPR6Y5phUfxC2B5Z"));
            await FirebaseHelper.UpdateRules("DenyEverything.json");

            // Act & Assert
            Assert.That(async() => await UnauthenticatedDatabase.Ref("People").Once <PeopleMap>(), Throws.Exception.InstanceOf <CouldNotParseAuthTokenException>());
        }