예제 #1
0
        public async Task <NotificationApplication> CreateNew(NotificationType notificationType,
                                                              UKCompetentAuthority competentAuthority)
        {
            var nextNotificationNumber = await numberGenerator.GetNextNotificationNumber(competentAuthority);

            var notification = new NotificationApplication(userContext.UserId, notificationType, competentAuthority,
                                                           nextNotificationNumber);

            return(notification);
        }
        public NotificationApplicationFactoryTests()
        {
            userContext = A.Fake<IUserContext>();
            numberGenerator = A.Fake<INotificationNumberGenerator>();

            A.CallTo(() => userContext.UserId).Returns(new Guid("246D5402-C835-4448-AFF0-37940B9ED436"));
            A.CallTo(() => numberGenerator.GetNextNotificationNumber(UKCompetentAuthority.England))
                .Returns(6000);

            factory = new NotificationApplicationFactory(userContext, numberGenerator);
        }
예제 #3
0
        public NotificationApplicationFactoryTests()
        {
            userContext     = A.Fake <IUserContext>();
            numberGenerator = A.Fake <INotificationNumberGenerator>();

            A.CallTo(() => userContext.UserId).Returns(new Guid("246D5402-C835-4448-AFF0-37940B9ED436"));
            A.CallTo(() => numberGenerator.GetNextNotificationNumber(UKCompetentAuthority.England))
            .Returns(6000);

            factory = new NotificationApplicationFactory(userContext, numberGenerator);
        }