From a7358fb837b1e06f69771c342eebd4e46872287c Mon Sep 17 00:00:00 2001 From: Ivan Gutorov Date: Sun, 16 Feb 2025 22:52:35 +0400 Subject: [PATCH] fix variable name in installation model tests --- .../InstallationComponentDataModelTests.cs | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/TheCyclopsProject/TheCyclopsTests/DataModelsTests/InstallationComponentDataModelTests.cs b/TheCyclopsProject/TheCyclopsTests/DataModelsTests/InstallationComponentDataModelTests.cs index 6b55343..a8e594b 100644 --- a/TheCyclopsProject/TheCyclopsTests/DataModelsTests/InstallationComponentDataModelTests.cs +++ b/TheCyclopsProject/TheCyclopsTests/DataModelsTests/InstallationComponentDataModelTests.cs @@ -9,45 +9,45 @@ internal class InstallationComponentDataModelTests [Test] public void InstallationIdIsNullOrEmptyTest() { - var saleProduct = CreateDataModel(null, Guid.NewGuid().ToString(), 10); - Assert.That(() => saleProduct.Validate(), Throws.TypeOf()); + var installationComponent = CreateDataModel(null, Guid.NewGuid().ToString(), 10); + Assert.That(() => installationComponent.Validate(), Throws.TypeOf()); - saleProduct = CreateDataModel(string.Empty, Guid.NewGuid().ToString(), 10); - Assert.That(() => saleProduct.Validate(), Throws.TypeOf()); + installationComponent = CreateDataModel(string.Empty, Guid.NewGuid().ToString(), 10); + Assert.That(() => installationComponent.Validate(), Throws.TypeOf()); } [Test] public void InstallationIdIsNotGuidTest() { - var saleProduct = CreateDataModel("installationId", Guid.NewGuid().ToString(), 10); - Assert.That(() => saleProduct.Validate(), Throws.TypeOf()); + var installationComponent = CreateDataModel("installationId", Guid.NewGuid().ToString(), 10); + Assert.That(() => installationComponent.Validate(), Throws.TypeOf()); } [Test] public void ComponentIdIsNullOrEmptyTest() { - var saleProduct = CreateDataModel(Guid.NewGuid().ToString(), null, 10); - Assert.That(() => saleProduct.Validate(), Throws.TypeOf()); + var installationComponent = CreateDataModel(Guid.NewGuid().ToString(), null, 10); + Assert.That(() => installationComponent.Validate(), Throws.TypeOf()); - saleProduct = CreateDataModel(string.Empty, Guid.NewGuid().ToString(), 10); - Assert.That(() => saleProduct.Validate(), Throws.TypeOf()); + installationComponent = CreateDataModel(string.Empty, Guid.NewGuid().ToString(), 10); + Assert.That(() => installationComponent.Validate(), Throws.TypeOf()); } [Test] public void ComponentIdIsNotGuidTest() { - var saleProduct = CreateDataModel(Guid.NewGuid().ToString(), "componentId", 10); - Assert.That(() => saleProduct.Validate(), Throws.TypeOf()); + var installationComponent = CreateDataModel(Guid.NewGuid().ToString(), "componentId", 10); + Assert.That(() => installationComponent.Validate(), Throws.TypeOf()); } [Test] public void CountIsLessOrZeroTest() { - var saleProduct = CreateDataModel(Guid.NewGuid().ToString(), Guid.NewGuid().ToString(), 0); - Assert.That(() => saleProduct.Validate(), Throws.TypeOf()); + var installationComponent = CreateDataModel(Guid.NewGuid().ToString(), Guid.NewGuid().ToString(), 0); + Assert.That(() => installationComponent.Validate(), Throws.TypeOf()); - saleProduct = CreateDataModel(Guid.NewGuid().ToString(), Guid.NewGuid().ToString(), -10); - Assert.That(() => saleProduct.Validate(), Throws.TypeOf()); + installationComponent = CreateDataModel(Guid.NewGuid().ToString(), Guid.NewGuid().ToString(), -10); + Assert.That(() => installationComponent.Validate(), Throws.TypeOf()); } [Test] @@ -56,15 +56,15 @@ internal class InstallationComponentDataModelTests var installationId = Guid.NewGuid().ToString(); var componentId = Guid.NewGuid().ToString(); var count = 10; - var saleProduct = CreateDataModel(installationId, componentId, count); + var installationComponent = CreateDataModel(installationId, componentId, count); - Assert.That(() => saleProduct.Validate(), Throws.Nothing); + Assert.That(() => installationComponent.Validate(), Throws.Nothing); Assert.Multiple(() => { - Assert.That(saleProduct.InstallationId, Is.EqualTo(installationId)); - Assert.That(saleProduct.ComponentId, Is.EqualTo(componentId)); - Assert.That(saleProduct.Count, Is.EqualTo(count)); + Assert.That(installationComponent.InstallationId, Is.EqualTo(installationId)); + Assert.That(installationComponent.ComponentId, Is.EqualTo(componentId)); + Assert.That(installationComponent.Count, Is.EqualTo(count)); }); }