Beispiel #1
0
        public void CreateSignRepositoryFactoryTest()
        {
            var repositoryFactoryTestClass = new RepositoryFactoryTestClass();
            var signs = repositoryFactoryTestClass.GetSigns();

            Assert.IsTrue(signs != null);
        }
Beispiel #2
0
        public void CreateSignMockRepositoryFactoryTest()
        {
            var signs = new List <Sign>
            {
                new Sign {
                    SignId = 1, AccountId = 101
                },
                new Sign {
                    SignId = 2, AccountId = 102
                }
            };
            var mockSignRepository = new Mock <IDataRepositoryFactory>();

            mockSignRepository.Setup(obj => obj.GetDataRepository <ISignRepository>().Get()).Returns(signs);
            var repositoryFactoryTestClass = new RepositoryFactoryTestClass(mockSignRepository.Object);
            var result = repositoryFactoryTestClass.GetSigns();

            Assert.IsTrue(signs == result);
        }