コード例 #1
0
        public void Both()
        {
            var thing =
                new DomainGenerator()
                .With <SomethingToGenerate>(opt => opt.Construct <int>().Construct <string>())
                .One <SomethingToGenerate>();

            Assert.NotNull(thing);
            Assert.NotEqual(0, thing.CheckInt());
            Assert.NotNull(thing.CheckString());
        }
コード例 #2
0
        public void TheDefaultConstructor()
        {
            var thing =
                new DomainGenerator()
                .With <SomethingToGenerate>(opt => opt.Construct())
                .One <SomethingToGenerate>();

            Assert.NotNull(thing);
            Assert.Equal(0, thing.CheckInt());
            Assert.Null(thing.CheckString());
        }
コード例 #3
0
        public void TheString()
        {
            var thing =
                new DomainGenerator()
                    .With<SomethingToGenerate>(opt => opt.Construct<string>())
                    .One<SomethingToGenerate>();

            Assert.NotNull(thing);
            Assert.Equal(0, thing.CheckInt());
            Assert.NotNull(thing.CheckString());
        }