示例#1
0
        public void NotFindRallyWhenItDoesNotExist()
        {
            var repo = new RallyRepository();

            var result = repo.Find("2019");

            Assert.True(result.IsFailure);
        }
示例#2
0
        public void AddRallyWhenItDoesNotExist()
        {
            var repo = new RallyRepository();

            var result = repo.Add(new Rally(2019, _finishLineDistance));

            Assert.True(result.IsSuccess);
        }
示例#3
0
        public void NotAddRallWhenItExists()
        {
            var repo = new RallyRepository();

            repo.Add(new Rally(2019, _finishLineDistance));
            var result = repo.Add(new Rally(2019, _finishLineDistance));

            Assert.True(result.IsFailure);
        }
示例#4
0
        public void FindRallyWhenItExists()
        {
            var repo = new RallyRepository();

            repo.Add(new Rally(2019, _finishLineDistance));

            var result = repo.Find("2019");

            Assert.True(result.IsSuccess);
        }