Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
inputfalken committed Jun 15, 2024
1 parent 45802e6 commit 8eaf26a
Showing 1 changed file with 30 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,36 @@ namespace DynamoDBGenerator.SourceGenerator.Tests.DynamoDBDocumentTests;
[DynamoDBMarshaller(EntityType = typeof((Guid, Guid)), AccessName = "INT", ArgumentType = typeof(int))]
public partial class PrimitiveArgumentTests
{
[Fact]
public void UnmarshallArgument_GUID_ShouldThrowInvalidOperationException()
{
var act = () => GUID.UnmarshallArgument(new Dictionary<string, AttributeValue>());

act.Should()
.Throw<InvalidOperationException>()
.WithMessage("Could not unmarshall the type 'Guid'*");
}

[Fact]
public void UnmarshallArgument_INT_ShouldThrowInvalidOperationException()
{
var act = () => INT.UnmarshallArgument(new Dictionary<string, AttributeValue>());

act.Should()
.Throw<InvalidOperationException>()
.WithMessage("Could not unmarshall the type 'Int32'*");
}

[Fact]
public void UnmarshallArgument_STRING_ShouldThrowInvalidOperationException()
{
var act = () => STRING.UnmarshallArgument(new Dictionary<string, AttributeValue>());

act.Should()
.Throw<InvalidOperationException>()
.WithMessage("Could not unmarshall the type 'String'*");
}

[Fact]
public void ExpressionValueTracker_STRING_ShouldBeExpandedCorrectly()
{
Expand Down

0 comments on commit 8eaf26a

Please sign in to comment.