コード例 #1
0
        public void SomethingFactory_Create_CreatesSomething()
        {
            SomethingFactory somethingFactory = new SomethingFactory();

            Domain.Something actual = somethingFactory.Create();

            Assert.IsType <Domain.Something>(actual);
        }
コード例 #2
0
        public void SomethingFactory_Create_CreatesSomethingWithName()
        {
            SomethingFactory somethingFactory = new SomethingFactory();
            string           expected         = "Fred Bloggs";

            Domain.Something actual = somethingFactory.Create(expected);

            Assert.IsType <Domain.Something>(actual);
            Assert.Equal(expected, actual.Name);
        }