Пример #1
0
        public void GetContractAllocationForWithNullReferenceReturnsNull()
        {
            // arrange
            var cache = GetDefaultStrictEmptyCache();

            Mock.Get(cache)
            .Setup(e => e.FCSContractAllocations)
            .Returns(GetDefaultContractAllocationTestList());

            var sut = new FCSDataService(cache);

            // act
            var result = sut.GetContractAllocationFor(null);

            // assert
            result.Should().BeNull();
            Mock.Get(cache).VerifyAll();
        }
Пример #2
0
        public void GetContractAllocationForMeetsExpectation(string candidate, string expectation)
        {
            // arrange
            var cache = GetDefaultStrictEmptyCache();

            Mock.Get(cache)
            .Setup(e => e.FCSContractAllocations)
            .Returns(GetDefaultContractAllocationTestList());

            var sut = new FCSDataService(cache);

            // act
            var result = sut.GetContractAllocationFor(candidate);

            // assert
            // TODO: fix me...
            // Assert.Equal(expectation, result.TenderSpecReference);
            expectation.Should().Be(result.TenderSpecReference);
            Mock.Get(cache).VerifyAll();
        }