Selaa lähdekoodia

Change method name.

Mariano Cano 6 vuotta sitten
vanhempi
sitoutus
fa099f2ae2
2 muutettua tiedostoa jossa 7 lisäystä ja 7 poistoa
  1. 2 2
      cas/apiv1/options.go
  2. 5 5
      cas/apiv1/options_test.go

+ 2 - 2
cas/apiv1/options.go

@@ -41,8 +41,8 @@ func (o *Options) Validate() error {
 	return nil
 	return nil
 }
 }
 
 
-// HasType returns if the options have the given type.
-func (o *Options) HasType(t Type) bool {
+// Is returns if the options have the given type.
+func (o *Options) Is(t Type) bool {
 	if o == nil {
 	if o == nil {
 		return t.String() == SoftCAS
 		return t.String() == SoftCAS
 	}
 	}

+ 5 - 5
cas/apiv1/options_test.go

@@ -80,7 +80,7 @@ func TestOptions_Validate(t *testing.T) {
 	}
 	}
 }
 }
 
 
-func TestOptions_HasType(t *testing.T) {
+func TestOptions_Is(t *testing.T) {
 	mockRegister(t)
 	mockRegister(t)
 
 
 	type fields struct {
 	type fields struct {
@@ -110,8 +110,8 @@ func TestOptions_HasType(t *testing.T) {
 	}
 	}
 	t.Run("nil", func(t *testing.T) {
 	t.Run("nil", func(t *testing.T) {
 		var o *Options
 		var o *Options
-		if got := o.HasType(SoftCAS); got != true {
-			t.Errorf("Options.HasType() = %v, want %v", got, true)
+		if got := o.Is(SoftCAS); got != true {
+			t.Errorf("Options.Is() = %v, want %v", got, true)
 		}
 		}
 	})
 	})
 	for _, tt := range tests {
 	for _, tt := range tests {
@@ -123,8 +123,8 @@ func TestOptions_HasType(t *testing.T) {
 				Issuer:               tt.fields.Issuer,
 				Issuer:               tt.fields.Issuer,
 				Signer:               tt.fields.Signer,
 				Signer:               tt.fields.Signer,
 			}
 			}
-			if got := o.HasType(tt.args.t); got != tt.want {
-				t.Errorf("Options.HasType() = %v, want %v", got, tt.want)
+			if got := o.Is(tt.args.t); got != tt.want {
+				t.Errorf("Options.Is() = %v, want %v", got, tt.want)
 			}
 			}
 		})
 		})
 	}
 	}