aboutsummaryrefslogtreecommitdiff
path: root/Timeline.Tests/UserAvatarServiceTest.cs
diff options
context:
space:
mode:
author杨宇千 <crupest@outlook.com>2019-10-24 16:56:41 +0800
committer杨宇千 <crupest@outlook.com>2019-10-24 16:56:41 +0800
commit89c106169bd2a16310fdaa6e0c48a3402d97de3a (patch)
treec8f5032f86d8a9e5df0117d438ea741cb0a4f613 /Timeline.Tests/UserAvatarServiceTest.cs
parentb67a26248d5dde4c3909c29b92b8a182248bdcc1 (diff)
downloadtimeline-89c106169bd2a16310fdaa6e0c48a3402d97de3a.tar.gz
timeline-89c106169bd2a16310fdaa6e0c48a3402d97de3a.tar.bz2
timeline-89c106169bd2a16310fdaa6e0c48a3402d97de3a.zip
...
Diffstat (limited to 'Timeline.Tests/UserAvatarServiceTest.cs')
-rw-r--r--Timeline.Tests/UserAvatarServiceTest.cs12
1 files changed, 6 insertions, 6 deletions
diff --git a/Timeline.Tests/UserAvatarServiceTest.cs b/Timeline.Tests/UserAvatarServiceTest.cs
index d22ad113..7489517b 100644
--- a/Timeline.Tests/UserAvatarServiceTest.cs
+++ b/Timeline.Tests/UserAvatarServiceTest.cs
@@ -63,8 +63,8 @@ namespace Timeline.Tests
Type = "image/png"
};
_validator.Awaiting(v => v.Validate(avatar))
- .Should().Throw<AvatarDataException>()
- .Where(e => e.Avatar == avatar && e.Error == AvatarDataException.ErrorReason.CantDecode);
+ .Should().Throw<AvatarFormatException>()
+ .Where(e => e.Avatar == avatar && e.Error == AvatarFormatException.ErrorReason.CantDecode);
}
[Fact]
@@ -76,8 +76,8 @@ namespace Timeline.Tests
Type = "image/jpeg"
};
_validator.Awaiting(v => v.Validate(avatar))
- .Should().Throw<AvatarDataException>()
- .Where(e => e.Avatar == avatar && e.Error == AvatarDataException.ErrorReason.UnmatchedFormat);
+ .Should().Throw<AvatarFormatException>()
+ .Where(e => e.Avatar == avatar && e.Error == AvatarFormatException.ErrorReason.UnmatchedFormat);
}
[Fact]
@@ -89,8 +89,8 @@ namespace Timeline.Tests
Type = PngFormat.Instance.DefaultMimeType
};
_validator.Awaiting(v => v.Validate(avatar))
- .Should().Throw<AvatarDataException>()
- .Where(e => e.Avatar == avatar && e.Error == AvatarDataException.ErrorReason.BadSize);
+ .Should().Throw<AvatarFormatException>()
+ .Where(e => e.Avatar == avatar && e.Error == AvatarFormatException.ErrorReason.BadSize);
}
[Fact]