示例#1
0
        public void LikeString()
        {
            string s     = "Testing";
            string regEx = @"(?<Test>\w{3})$";

            StringAssert.Like(s, regEx);
        }
        public void WillThrowIfShellIsNotForm()
        {
            IShellView stubShell = MockRepository.GenerateStub <IShellView>();
            DefaultApplicationContext context = new DefaultApplicationContext(stubShell, new IModuleLoader[] { });

            try
            {
                context.GetShellAsForm();
                Assert.Fail("Should have thrown");
            }
            catch (Exception ex)
            {
                StringAssert.Like(ex.Message,
                                  @"The IShellView implementation IShellViewProxy[\w\d]+ should be derived from System\.Windows\.Forms\.Form");
            }
        }