Beispiel #1
0
    private async Task SeedReactionsAsync()
    {
        await _reactionManager.GetOrCreateAsync(
            _cmsKitTestData.User1Id,
            _cmsKitTestData.EntityType1,
            _cmsKitTestData.EntityId1,
            StandardReactions.Confused);

        await _reactionManager.GetOrCreateAsync(
            _cmsKitTestData.User1Id,
            _cmsKitTestData.EntityType1,
            _cmsKitTestData.EntityId1,
            StandardReactions.ThumbsUp);

        await _reactionManager.GetOrCreateAsync(
            _cmsKitTestData.User1Id,
            _cmsKitTestData.EntityType1,
            _cmsKitTestData.EntityId2,
            StandardReactions.Heart);

        await _reactionManager.GetOrCreateAsync(
            _cmsKitTestData.User1Id,
            _cmsKitTestData.EntityType2,
            _cmsKitTestData.EntityId1,
            StandardReactions.Rocket);

        await _reactionManager.GetOrCreateAsync(
            _cmsKitTestData.User2Id,
            _cmsKitTestData.EntityType1,
            _cmsKitTestData.EntityId1,
            StandardReactions.ThumbsUp);
    }
Beispiel #2
0
    public async Task CreateAsync()
    {
        var reaction = await _reactionManager.GetOrCreateAsync(
            _cmsKitTestData.User2Id,
            _cmsKitTestData.EntityType1,
            _cmsKitTestData.EntityId2,
            StandardReactions.Eyes
            );

        reaction.CreatorId.ShouldBe(_cmsKitTestData.User2Id);
        reaction.EntityType.ShouldBe(_cmsKitTestData.EntityType1);
        reaction.EntityId.ShouldBe(_cmsKitTestData.EntityId2);
        reaction.ReactionName.ShouldBe(StandardReactions.Eyes);
    }