Exemplo n.º 1
0
        public async Task GetLeastFavouriteColor_WithGrainState_ReturnsColor()
        {
            // Arrange
            var state = new ColorGrainState
            {
                Color = Color.Red,
                Id    = GrainId,
            };

            Silo.AddGrainState <ColorRankingGrain, ColorGrainState>(state: state);

            var grain = await Silo.CreateGrainAsync <ColorRankingGrain>(GrainId);

            // Act
            var color = await grain.GetLeastFavouriteColor();

            color.Should().Be(Color.Red);
        }