コード例 #1
0
        public void Count_WhenCountIsNotSet_ThrowsException()
        {
            FakeDataSource fakeDataSource = new FakeDataSource();

            Action act = () => { fakeDataSource.Count(); };

            act.Should().Throw <NotImplementedException>();
        }
コード例 #2
0
        public void Count_WhenCountIsSet_ReturnsCount()
        {
            FakeDataSource fakeDataSource = new FakeDataSource().WithCount(7);

            fakeDataSource.Count().Should().Be(7);
        }