public void CallWhenNotSetFelterTest()
        {
            //Arrange
            var domainStatUserRegistration = new DomainStatUserRegistration();
            var domainReport = new DomainReport();

            var allRegistrationsFilter = new AllRegistrationsFilter();

            //Act
            allRegistrationsFilter.Call(domainStatUserRegistration, domainReport);
            allRegistrationsFilter.Call(domainStatUserRegistration, domainReport);

            //Assert
            Assert.AreEqual(2, domainReport.AllRegistrations);
        }
예제 #2
0
        public void CallWhenNotSetFelterTest()
        {
            //Arrange
            var domainStatUserRegistration = new DomainStatUserRegistration();
            var domainReport = new DomainReport();

            var allRegistrationsFilter = new AllRegistrationsFilter();

            //Act
            allRegistrationsFilter.Call(domainStatUserRegistration, domainReport);
            allRegistrationsFilter.Call(domainStatUserRegistration, domainReport);

            //Assert
            Assert.AreEqual(2, domainReport.AllRegistrations);
        }
        public void CallTest()
        {
            //Arrange
            var domainStatUserRegistration = new DomainStatUserRegistration();

            var domainReport = new DomainReport();

            var statUserRegistrationFilter = new Mock<IStatUserRegistrationFilter>();

            var allRegistrationsFilter = new AllRegistrationsFilter();
            allRegistrationsFilter.Set(statUserRegistrationFilter.Object);

            //Act
            allRegistrationsFilter.Call(domainStatUserRegistration, domainReport);

            //Assert
            Assert.AreEqual(1, domainReport.AllRegistrations);
            statUserRegistrationFilter.Verify(m => m.Call(domainStatUserRegistration, domainReport), Times.Once());
        }
예제 #4
0
        public void CallTest()
        {
            //Arrange
            var domainStatUserRegistration = new DomainStatUserRegistration();

            var domainReport = new DomainReport();

            var statUserRegistrationFilter = new Mock <IStatUserRegistrationFilter>();

            var allRegistrationsFilter = new AllRegistrationsFilter();

            allRegistrationsFilter.Set(statUserRegistrationFilter.Object);

            //Act
            allRegistrationsFilter.Call(domainStatUserRegistration, domainReport);

            //Assert
            Assert.AreEqual(1, domainReport.AllRegistrations);
            statUserRegistrationFilter.Verify(m => m.Call(domainStatUserRegistration, domainReport), Times.Once());
        }