コード例 #1
0
 public void SaveMockData()
 {
     if (RunAsIntegrationTest && MockDataRepository != null)
     {
         MockDataRepository.SaveMockData(MockCreator.Responses);
     }
 }
コード例 #2
0
ファイル: ChangeServiceFacts.cs プロジェクト: anurse/ReviewR
            public void InitializesValues()
            {
                // Arrange
                var data = new MockDataRepository();

                // Act
                ChangeService auth = new ChangeService(data);

                // Assert
                Assert.Same(data, auth.Data);
            }
コード例 #3
0
        public void SetUp()
        {
            _testDataRepository = new MockDataRepository();
            _saveGame           = Resources.Load <SaveGame>("TestSave/TestSaveGame");
            _saveController     = Resources.Load <SaveController>("TestSave/TestSaveController");

            _saveController.Initialise(
                new MockEventBus(),
                _testDataRepository
                );
        }
コード例 #4
0
        public AgreementsControllerTests()
        {
            this._mock = new MockDataRepository();

            if (this._mapper == null)
            {
                var mappingConfig = new MapperConfiguration(mc =>
                {
                    mc.AddProfile(new AgreementsProfile());
                });
                IMapper mapper = mappingConfig.CreateMapper();
                _mapper = mapper;
            }
        }
コード例 #5
0
        public void TestInit()
        {
            _testStopWatch    = new Stopwatch();
            _coroutineManager = new GameObject("Test_CoroutineManager", typeof(CoroutineManager)).GetComponent <CoroutineManager>();

            _jsonRpcClient                   = new MockJsonRpcClient();
            _localDataRepository             = new MockDataRepository();
            _rDataClient                     = new RDataClient();
            _rDataClient.JsonRpcClient       = _jsonRpcClient;
            _rDataClient.LocalDataRepository = _localDataRepository;
            _rDataClient.ChunkLifeTime       = 0.010f;

            _coroutineManager.TestCoroutine(_rDataClient.Open("hostname"));
            _testStopWatch.Start();
        }
コード例 #6
0
            public void InitializesValues()
            {
                // Arrange
                var data = new MockDataRepository();
                var tokens = new TokenService();
                var settings = new MockSettings();

                // Act
                AuthenticationService auth = new AuthenticationService(data, tokens, settings);

                // Assert
                Assert.Same(data, auth.Data);
                Assert.Same(tokens, auth.Tokens);
                Assert.Same(settings, auth.Settings);
                Assert.Equal(TimeSpan.FromMinutes(30), auth.Timeout);
            }
コード例 #7
0
            public TestableCommentsController()
            {
                MockData = new MockDataRepository();

                Comments = new CommentService(MockData);
            }
コード例 #8
0
 public TestableAuthenticationService()
 {
     Data = MockData = new MockDataRepository();
     Tokens = MockTokens = new MockTokenService();
     Settings = MockSettings = new MockSettings();
     TokenExchanges = new Dictionary<string, HttpResponseMessage>();
 }
コード例 #9
0
 public TestableAuthenticationService()
 {
     Authenticators = new Dictionary<string, Authenticator>() {
         {"fb", new FacebookAuthenticator()}
     };
     Data = MockData = new MockDataRepository();
     Settings = MockSettings = new MockSettings();
     TokenExchanges = new Dictionary<string, UserInfo>();
 }
コード例 #10
0
            public void InitializesValues()
            {
                // Arrange
                var data = new MockDataRepository();
                var auths = new List<Authenticator>() { new FacebookAuthenticator() };
                var settings = new MockSettings();

                // Act
                AuthenticationService auth = new AuthenticationService(auths, settings, data);

                // Assert
                Assert.Same(data, auth.Data);
                Assert.Equal(1, auth.Authenticators.Count);
                Assert.Same(auths[0], auth.Authenticators["fb"]);
                Assert.Same(settings, auth.Settings);
            }
コード例 #11
0
 public TestableReviewsController()
 {
     MockData = new MockDataRepository();
     Reviews = new ReviewService(MockData);
 }
コード例 #12
0
            public TestableChangesController()
            {
                MockData = new MockDataRepository();

                Changes = new ChangeService(MockData);
                Diff = (MockDiff = new Mock<DiffService>()).Object;
            }
コード例 #13
0
            public void InitializesValues()
            {
                // Arrange
                var data = new MockDataRepository();
                var diff = new Mock<DiffService>().Object;

                // Act
                IterationService auth = new IterationService(data, diff);

                // Assert
                Assert.Same(data, auth.Data);
                Assert.Same(diff, auth.Diff);
            }
コード例 #14
0
 public MockDataService(MockDataRepository mockDataRepository, MockDataRepositoryDapper mockDataRepositoryDapper)
 {
     _mockDataRepository       = mockDataRepository;
     _mockDataRepositoryDapper = mockDataRepositoryDapper;
 }
コード例 #15
0
 public DataController(MockDataRepository mockRepo)
 {
     _mockRepo = mockRepo;
 }
コード例 #16
0
ファイル: ReviewServiceFacts.cs プロジェクト: anurse/ReviewR
 public TestableReviewService()
 {
     Data = MockData = new MockDataRepository();
 }
コード例 #17
0
 public TestableIterationsController()
 {
     MockData = new MockDataRepository();
     Iterations = new IterationService(MockData, new Mock<DiffService>().Object);
 }
コード例 #18
0
ファイル: ChangeServiceFacts.cs プロジェクト: anurse/ReviewR
 public TestableChangeService()
 {
     Data = MockData = new MockDataRepository();
 }
コード例 #19
0
 public TestableIterationsController(Mock<IterationService> mockIterations)
 {
     MockData = new MockDataRepository();
     Iterations = (MockIterations = mockIterations).Object;
 }
コード例 #20
0
 public TestableIterationService()
 {
     Data = MockData = new MockDataRepository();
     Diff = (MockDiff = new Mock<DiffService>()).Object;
 }
コード例 #21
0
ファイル: CommentServiceFacts.cs プロジェクト: anurse/ReviewR
 public TestableCommentService()
 {
     Data = MockData = new MockDataRepository();
 }