コード例 #1
0
        public void MainPartIsBetterThanDesigner()
        {
            var context = new ProjectEntityModelContext(MockRepository.GenerateStrictMock <IProject>(), ".cs");

            Assert.IsTrue(context.IsBetterPart(CreateMockTypeDefinition("Form.cs"), CreateMockTypeDefinition("Form.Designer.cs")));
            Assert.IsFalse(context.IsBetterPart(CreateMockTypeDefinition("Form.Designer.cs"), CreateMockTypeDefinition("Form.cs")));
        }
コード例 #2
0
 public void XamlCodeBehindIsBetterThanXaml()
 {
     var context = new ProjectEntityModelContext(MockRepository.GenerateStrictMock<IProject>(), ".cs");
     Assert.IsTrue(context.IsBetterPart(CreateMockTypeDefinition("Window.xaml.cs"), CreateMockTypeDefinition("Window.xaml")));
     Assert.IsTrue(context.IsBetterPart(CreateMockTypeDefinition("Window.cs"), CreateMockTypeDefinition("Window.xaml")));
     Assert.IsFalse(context.IsBetterPart(CreateMockTypeDefinition("Window.xaml"), CreateMockTypeDefinition("Window.xaml.cs")));
     Assert.IsFalse(context.IsBetterPart(CreateMockTypeDefinition("Window.xaml"), CreateMockTypeDefinition("Window.cs")));
 }
コード例 #3
0
        public void XamlCodeBehindIsBetterThanXaml()
        {
            var context = new ProjectEntityModelContext(MockRepository.GenerateStrictMock <IProject>(), ".cs");

            Assert.IsTrue(context.IsBetterPart(CreateMockTypeDefinition("Window.xaml.cs"), CreateMockTypeDefinition("Window.xaml")));
            Assert.IsTrue(context.IsBetterPart(CreateMockTypeDefinition("Window.cs"), CreateMockTypeDefinition("Window.xaml")));
            Assert.IsFalse(context.IsBetterPart(CreateMockTypeDefinition("Window.xaml"), CreateMockTypeDefinition("Window.xaml.cs")));
            Assert.IsFalse(context.IsBetterPart(CreateMockTypeDefinition("Window.xaml"), CreateMockTypeDefinition("Window.cs")));
        }
コード例 #4
0
 public void MainPartIsBetterThanDesigner()
 {
     var context = new ProjectEntityModelContext(MockRepository.GenerateStrictMock<IProject>(), ".cs");
     Assert.IsTrue(context.IsBetterPart(CreateMockTypeDefinition("Form.cs"), CreateMockTypeDefinition("Form.Designer.cs")));
     Assert.IsFalse(context.IsBetterPart(CreateMockTypeDefinition("Form.Designer.cs"), CreateMockTypeDefinition("Form.cs")));
 }