コード例 #1
0
        public async Task GetAccountInformation_ReadsDateFromFile_DataIsLoaded()
        {
            var accountInfoService = new AccountInfoService();
            //_accountInfoServiceMock.Setup(x => x.GetAccountInformation()).ReturnsAsync(fakeAccountInfoData);

            var data = await accountInfoService.GetAccountInformation() as List <AccountInformation>;

            data.Should().NotBeEmpty();
            //TODO: this can be done like this because the data is static
            data.Count.Should().Be(7);
        }
コード例 #2
0
 private void SetUp()
 {
     _accountInfoRepositoryMock = new Mock <IAccountInfoRepository>();
     _subject         = new AccountInfoService(_accountInfoRepositoryMock.Object);
     _accountInfoDtos = new List <AccountInfoDTO>
     {
         new AccountInfoDTO {
             AccountNumber = 3001, Year = 2011, PartsReportCategory = 2
         },
         new AccountInfoDTO {
             AccountNumber = 3002, Year = 2011, ResultReportCategory = 2
         },
         new AccountInfoDTO {
             AccountNumber = 3003, Year = 2011, WeekCategory = 1
         }
     };
 }
コード例 #3
0
 // Helper Methods
 private AccountInfoService CreateAccountInfoService()
 {
     var userId = Guid.Parse(User.Identity.GetUserId());
     var service = new AccountInfoService(userId);
     return service;
 }