Skip to content

Commit 1fa1eb2

Browse files
committed
Cleanup
1 parent 23d8cb2 commit 1fa1eb2

File tree

4 files changed

+4
-30
lines changed

4 files changed

+4
-30
lines changed

Src/Xer.DomainDriven/DomainEventStream.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public DomainEventStream AppendDomainEvent(IDomainEvent domainEventToAppend)
7171
throw new ArgumentNullException(nameof(domainEventToAppend));
7272
}
7373

74-
if (!AggregateRootId.Equals(domainEventToAppend.AggregateRootId))
74+
if (AggregateRootId != domainEventToAppend.AggregateRootId)
7575
{
7676
throw new InvalidOperationException("Cannot append domain event belonging to a different aggregate root.");
7777
}
@@ -91,7 +91,7 @@ public DomainEventStream AppendDomainEventStream(IDomainEventStream streamToAppe
9191
throw new ArgumentNullException(nameof(streamToAppend));
9292
}
9393

94-
if (!AggregateRootId.Equals(streamToAppend.AggregateRootId))
94+
if (AggregateRootId != streamToAppend.AggregateRootId)
9595
{
9696
throw new InvalidOperationException("Cannot append domain events belonging to a different aggregate root.");
9797
}

Src/Xer.DomainDriven/Repositories/PublishingAggregateRootRepository.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public class PublishingAggregateRootRepository<TAggregateRoot> : IAggregateRootR
1616
/// <param name="inner">Aggregate root repository to decorate.</param>
1717
/// <param name="domainEventPublisher">Domain event publisher.</param>
1818
public PublishingAggregateRootRepository(IAggregateRootRepository<TAggregateRoot> inner,
19-
IDomainEventPublisher domainEventPublisher)
19+
IDomainEventPublisher domainEventPublisher)
2020
{
2121
_inner = inner;
2222
_domainEventPublisher = domainEventPublisher;

Tests/Xer.DomainDriven.Tests/Entities/TestEntity.cs

Lines changed: 0 additions & 26 deletions
This file was deleted.

Tests/Xer.DomainDriven.Tests/ValueObjectTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public void ShouldNotBeEqualIfValueObjectsMatchByValueButDifferentType()
123123
var valueObject1 = new TestValueObject("Test", 123);
124124
var valueObject2 = new TestValueObjectSecond("Test", 123);
125125

126-
// Same ID, should be equal.
126+
// Same value, should be equal.
127127
valueObject1.Should().NotBe(valueObject2);
128128
}
129129
}

0 commit comments

Comments
 (0)