コード例 #1
0
        public async Task TestPostCards_WithSet()
        {
            // Arrange
            ControllerMock primaryUser = new ControllerMock();

            primaryUser.SetupDummySession(SessionGuid)
            .SetupDummyWorldAsTree()
            .SetupSessionPhase(SessionPhase.Reinforcements)
            .SetupCardOwner(ControllerMockRegionRepositoryExtensions.DummyWorldRegionA)
            .SetupCardOwner(ControllerMockRegionRepositoryExtensions.DummyWorldRegionB)
            .SetupCardOwner(ControllerMockRegionRepositoryExtensions.DummyWorldRegionC);

            // Act
            await primaryUser.NationController.PostCards(SessionGuid, new List <Guid> {
                ControllerMockRegionRepositoryExtensions.DummyWorldRegionA,
                ControllerMockRegionRepositoryExtensions.DummyWorldRegionB,
                ControllerMockRegionRepositoryExtensions.DummyWorldRegionC
            });

            // Assert
            Assert.AreEqual(9U, primaryUser.GetNation(SessionGuid, primaryUser.OwnerId).AvailableReinforcements);
        }