コード例 #1
0
        public void WhenArgumentIsAnything()
        {
            IModelRepository mock = MockRepository.GenerateMock <IModelRepository> ();

            var modelCreator = new ModelCreator(mock);
            var theModel     = new AnotherModel()
            {
                FieldA = 1, FieldB = "Test"
            };

            mock.Expect(p => p.Add(Arg <AnotherModel> .Is.Anything));
            modelCreator.CreateModel(theModel);

            mock.VerifyAllExpectations();
        }