예제 #1
0
        public async Task ManageClaimAsync_GivenInvalidFileName_ThenInvalidDataExceptionIsThrown()
        {
            // arrange
            var manager = new PhoneClaimsManager();
            var model   = new PhoneClaimModel(null, new MemoryStream());

            // assert
            await Assert.ThrowsAsync <InvalidDataException>(async() => await manager.ManageClaimAsync(model));
        }
        public async Task ManageClaimAsync_GivenNoValidationIssues_ThenTrueResultIsReturned()
        {
            //arrange
            var manager = new PhoneClaimsManager();

            //act
            var model  = new PhoneClaimModel("fileName.txt", new MemoryStream());
            var result = await manager.ManageClaimAsync(model);

            //assert
            Assert.IsTrue(result);
        }